Kubernetes MASTER端口问题
(2017-11-01 14:54:14)
标签:
kubernetesmasterport |
分类: Docker |
[root@docker kubernetes]# kubectl cluster-info
Kubernetes master is running at http://docker:8080
但是端口号确实9999,如下:
[root@docker kubernetes]# systemctl status
kube-apiserver
鈼[0m kube-apiserver.service - Kubernetes API Server
[root@docker kubernetes]# netstat -tunlp|grep api
tcp
0
0 0.0.0.0:6443
0.0.0.0:*
LISTEN
1630/kube-apiserver
tcp
0
0 0.0.0.0:9999
0.0.0.0:*
LISTEN
1630/kube-apiserver
最后在网上找了很久,有一个环境变量可以控制
#export KUBERNETES_MASTER=http://docker:9999
[root@docker kubernetes]# kubectl cluster-info
Kubernetes master is running at http://docker:9999
To further debug and diagnose cluster problems, use 'kubectl
cluster-info dump'.
配置到/etc/profile即可
[root@docker kubernetes]# tail -1 /etc/profile
export KUBERNETES_MASTER=http://docker:9999