kubectl cannot connect to kube_master

asked 2015-11-02 08:55:10 -0500

d3an-meehan gravatar image

updated 2015-11-02 08:55:52 -0500

Running on a Devstack (stable/kilo) build I am having trouble connecting to my kube_master via kubectl.

$>:heat output-show HudsonBay-r3ulde4aljsf kube_master
"172.24.4.16"

$>:heat output-show HudsonBay-r3ulde4aljsf kube_minions_external
[
  "172.24.4.17",
  "172.24.4.18"
]

$>:kubectl config view
apiVersion: v1
clusters: []
contexts: []
current-context: ""
kind: Config
preferences: {}
users: []

$>:export KUBERNETES_MASTER=http://$(nova list | grep kube_master | awk '{print $13}'):8080
http://172.24.4.16:8080

$>:kubectl get pods
Error: an error on the server has prevented the request from succeeding (get pods)

$>:kubectl get minions
Error: an error on the server has prevented the request from succeeding (get minions)

But if I ssh into the Master directly I can run kubectl commands perfectly.

$>:ssh minion@172.24.4.16
[minion@hudsonbay-r3ulde4aljsf-kube-master-2dpa3rlkecl7 ~]$ kubectl get minions
NAME       LABELS    STATUS
10.0.0.4   <none>    Ready
10.0.0.5   <none>    Ready
[minion@hudsonbay-r3ulde4aljsf-kube-master-2dpa3rlkecl7 ~]$ kubectl get pods
POD       IP        CONTAINER(S)   IMAGE(S)   HOST      LABELS    STATUS    CREATED
[minion@hudsonbay-r3ulde4aljsf-kube-master-2dpa3rlkecl7 ~]$ kubectl config view
apiVersion: v1
clusters: []
contexts: []
current-context: ""
kind: Config
preferences: {}
users: []
edit retag flag offensive close merge delete

Comments

heat output-show HudsonBay-r3ulde4aljsf kube_minions_external is not working in my environment.

apoorva gravatar imageapoorva ( 2018-06-20 11:23:58 -0500 )edit