🛠️ Новый пользователь не смог запустить Kubectl с ошибкой “The connection to the server xxx.xxx.xxx was refused – did you specify the right host or port?”

by itisgood

Проблема

При запуске kubectl от нового созданного пользователя произошла ошибка:

The connection to the server xxx.xxx.xxx was refused - did you specify the right host or port?

Решение

Вновь созданный пользователь не настроил KUBECONFIG.

Настройте конфигурацию kubernetes для нового пользователя:

# mkdir -p $HOME/.kube
# sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
# sudo chown $(id -u):$(id -g) $HOME/.kube/config

You may also like

Leave a Comment