当前位置:网站首页>[problem solving] the connection to the server localhost:8080 was referred

[problem solving] the connection to the server localhost:8080 was referred

2022-06-24 07:02:00 Look, the future

Problem analysis

reason :kubernetes master Not bound to this machine , When the cluster is initialized, it is not bound , At this time, the problem can be solved by setting the environment variable on the machine .

Solution

Step one : Set the environment variable

Depending on the situation , Record here linux Set the environment variable
Mode one : Edit file settings

 vim /etc/profile
  Add a new environment variable at the bottom  export KUBECONFIG=/etc/kubernetes/admin.conf

Mode two : Directly append the contents of the file

echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> /etc/profile

Step two : Make effective

source /etc/profile
原网站

版权声明
本文为[Look, the future]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240034133103.html