2
votes

Tried installing kubernetes v1.2.0 on azure environment but after installation cannot access kube apis at port 8080.

Following services are running :

root      1473  0.2  0.5 536192 42812 ?        Ssl  09:22   0:00 /home/weave/weaver --port 6783 --name 22:95:7a:6e:30:ed --nickname kube-00 --datapath datapath --ipalloc-range 10.32.0.0/12 --dns-effective-listen-address 172.17.42.1 --dns-listen-address 172.17.42.1:53 --http-addr 127.0.0.1:6784
root      1904  0.1  0.2  30320 20112 ?        Ssl  09:22   0:00 /opt/kubernetes/server/bin/kube-proxy --master=http://kube-00:8080 --logtostderr=true

root      1907  0.0  0.0  14016  2968 ?        Ss   09:22   0:00 /bin/bash -c until /opt/kubernetes/server/bin/kubectl create -f /etc/kubernetes/addons/; do sleep 2; done
root      1914  0.2  0.3  35888 22212 ?        Ssl  09:22   0:00 /opt/kubernetes/server/bin/kube-scheduler --logtostderr=true --master=127.0.0.1:8080
root      3129  2.2  0.3  42488 25192 ?        Ssl  09:27   0:00 /opt/kubernetes/server/bin/kube-controller-manager --master=127.0.0.1:8080 --logtostderr=true

curl -v http://localhost:8080 returns error

  • Rebuilt URL to: http://localhost:8080/
  • Trying 127.0.0.1...
  • connect to 127.0.0.1 port 8080 failed: Connection refused
  • Failed to connect to localhost port 8080: Connection refused
  • Closing connection 0 curl: (7) Failed to connect to localhost port 8080: Connection refused

Same works fine with v1.1.2.

I'm using following guidelines https://github.com/kubernetes/kubernetes/tree/master/docs/getting-started-guides/coreos/azure and updated line https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/coreos/azure/cloud_config_templates/kubernetes-cluster-main-nodes-template.yml#L187 to user version v1.2.0.

1
Up-to-date code lives in weaveworks/weave-kubernetes-coreos-azure no and we have to PRs outstanding to update the docs kubernetes/kubernetes.github.io#314 and kubernetes/kubernetes#23818.errordeveloper
Thanks for sharing this. Now, I stuck with something else: after configuring pod to use azure storage account, when I restart the pod I cannot get back the old data. Following this link github.com/kubernetes/kubernetes/tree/… On azure portal I can see IOs for the storage account but after pod restart data seems to be lost.Phagun Baya

1 Answers

3
votes

The services you show running do not include the apiserver. For a quick breakdown I can explain what each service does that you show running.

  • Weave: This is a software overlay network and assigns IP addresses to your pods.
  • kube-proxy: This runs on your worker nodes allow pods to run and route traffic between exposed services.
  • kubectl create: Kubectl is actually the management cli tool but in this case using -f /etc/kubernetes/addons/; sleep 2 is watching the /etc/kubernetes/addons/ folder and automatically creating any objects (pods, replication controllers, services, etc.) that are put in that folder.
  • kube-scheduler: Responsible for scheduling pods onto nodes. Uses policies and rules. kube-controller-manager: Manages the state of the cluster by always making sure the current state and desired state are the same. This includes starting/stopping pods and creating objects (services, replication-controllers, etc) that do not yet exist or killing them if they shouldn't exist.

All of these services interact with the kube-apiserver which should be a separate service that coordinates all of the information these other services use. You'll need the apiserver running in order for all of the other components to do their jobs.

I won't go into the details of getting it running in your environment but from it looks like in the comments on your original thread you found some missing documentation to get it running.