vmware-archive / photon-controller

Photon Controller
Other
26 stars 4 forks source link

Failed to deploy kubernetes cluster #72

Closed medvedzver closed 7 years ago

medvedzver commented 7 years ago

Hi!

I've deployed PC on ESXi using PCInstaller and now I'm trying to deploy a Kubernetes cluster. I uploaded image as it described here and I did enable-cluster-type. Trying to deploy cluster: photon cluster create -n Kube -k KUBERNETES --dns 192.168.218.2 --gateway 192.168.218.1 --netmask 255.255.255.0 --master-ip 192.168.218.35 --container-network 10.2.0.0/16 --etcd1 192.168.218.36 Amount of slaves: 1 Skip etcd2 static IP

I can see a new VM starting with IP 192.168.218.36 in ESXi ui and I can ping it. Deployment fails with timeout on CREATE_KUBERNETES_CLUSTER_SETUP_ETCD stage. In /var/log/esxicloud/photon-controller.log I see

INFO  [2016-11-30 14:07:05,638] com.vmware.photon.controller.clustermanager.tasks.ClusterWaitTaskService: [/photon/clustermanager/wait-for-cluster-tasks/e9466605-adc8-44d9-9ec8-74dce7a79d9d] Handling patc
h operation for service /photon/clustermanager/wait-for-cluster-tasks/e9466605-adc8-44d9-9ec8-74dce7a79d9d
INFO  [2016-11-30 14:07:05,638] com.vmware.photon.controller.clustermanager.statuschecks.EtcdStatusChecker: Checking Etcd: 192.168.218.36
WARN  [2016-11-30 14:07:05,642] com.vmware.photon.controller.clustermanager.statuschecks.EtcdStatusChecker: Etcd call failed:
! java.net.ConnectException: Connection refused
! at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
! at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
! at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:173)
! at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:147)
! at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348)
! at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:189)
! at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.doExecute(CloseableHttpAsyncClientBase.java:67)
! at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.access$000(CloseableHttpAsyncClientBase.java:38)
! at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:57)
! at java.lang.Thread.run(Thread.java:745)

I also can't connect to the new VM. I assume it's a VM from the Kubernetes image and login and password should be root / VMware1! .

What is the correct login/password for Kubernetes VM? Any ideas why PC can't connect to the new VM? Thanks!

mwest44 commented 7 years ago

The Kubernetes image you are using was just updated to support 1.1 of PC. Are you using 1.1?

AlainRoy commented 7 years ago

The fact that I see "Amount of slaves" in the output suggests you're using an older version of the Photon CLI. (We renamed them to be workers.)

What version of Photon Controller did you deploy? Where did you get the Kubernetes image to use with it? We want to make sure these two match.

How did you get the static IP addresses? They're valid addresses on that network?

medvedzver commented 7 years ago

@AlainRoy I downloaded kubernetes image kubernetes-1.4.3-pc-1.1.0-5de1cb7.ova This is I believe cli version:

photon -v
photon version Git commit hash: 63a4889

I used installer-vm.ova from Photon Controller 1.0.0 release so @mwest44 I guess I'm using 1.0

The ip addresses are valid. My PC has 192.168.218.33 , and I'm able to ping Kubernetes VM when it starts.

What about login/password for Kubernetes VM? Can you please tell me how to get them? Meanwhile I'll try to update controller to 1.1.

AlainRoy commented 7 years ago

Ah, you've mixed versions. That won't work.

For Photon Controller 1.0, use this image, which is Kubernetes 1.0. https://s3.amazonaws.com/photon-platform/artifacts/cluster/photon-kubernetes-vm-disk1.vmdk

For Photon Controller 1.1.0, use the image you have. For the sake of future people viewing this, it should be the image associated with the Photon Controller release. For 1.1.0, you can find the Kubernetes image from: https://github.com/vmware/photon-controller/releases/tag/v1.1.0 https://github.com/vmware/photon-controller/releases/download/v1.1.0/kubernetes-1.4.3-pc-1.1.0-5de1cb7.ova

In Photon Controller 1.0, I forget the username and password, sorry.

For Photon Controller 1.1, we disabled logging in as root from ssh for security reasons. We really don't want to ship VMs with well known root passwords. When you create the cluster, you can specify your ssh public key, then you can ssh without using a well-known password.

I hope this helps. Let me know if you have more questions!

medvedzver commented 7 years ago

@AlainRoy Thanks! Password for Kubernetes 1.0 should be root / VMware1!. It didn't work for Kubernetes 1.1 for the reasons you mentioned.