Skip to content

Latest commit

 

History

History
130 lines (94 loc) · 4.05 KB

README.md

File metadata and controls

130 lines (94 loc) · 4.05 KB

Getting Started on vSphere

Prerequisites

  • docker-engine for executing the kubernetes-anywhere deployment which can be downloaded here.
  • make for entering the deployment environment.

Deployment

Note: The deployment is tested with kubernetes v1.4.0 and v1.4.4.

Upload Template to vSphere:

You must upload template to vCenter before deploying kubernetes.

Upload using vSphere Client.

  1. Login to vSphere Client.
  2. Right-Click on ESX host on which you want to deploy template.
  3. Select Deploy OVF template.
  4. Copy and paste URL for OVA.
  5. Follow next steps according to instructions mentioned in wizard.

You can also upload ova using govc.

Note: This OVA is based on Photon OS(v1.0) with virtual hardware v11.

Clone the kubernetes-anywhere tool:

git clone https://github.com/kubernetes/kubernetes-anywhere
cd kubernetes-anywhere

Enter the kubernetes-anywhere deployment environment:

make docker-dev

Start the deployment wizard:

make deploy

and fill complete the config wizard to deploy a kubernetes-anywhere cluster.

Notes:

  • To properly boot a cluster in vSphere, you MUST set these values in the wizard:

    * phase2.installer_container = "docker.io/ashivani/k8s-ignition:v4"
    
  • To change configuration, run: make config .config

  • The deployment is configured to use DHCP.

Congratulations!

You have a Kubernetes cluster!

Notes If you want to launch another cluster while keeping existing one then clone the kubernetes-anywhere and follow the steps above.

Get Cluster Info:

First set KUBECONFIG to access cluster using kubectl:

export KUBECONFIG=phase1/vsphere/.tmp/kubeconfig.json

You will get cluster information when you run:

kubectl cluster-info

Destroy

After you've had a great experience with Kubernetes, run:

$ make destroy

to tear down your cluster.

Issues

  1. make destroy is flaky.

    Terraform fails to destroy VM's and remove the state for existing cluster.

    • Workaround: In vSphere Client,
      1. Stop all VM's that are setup by kubernetes-anywhere.
      2. Right-Click on VM and select Delete from Disk.
      3. Run make clean.

Troubleshooting

Validation Fails (Zero nodes are healthy)

If no nodes are available, there was likely a provisioning failure on the master (either in vSphere or in the ignition provisioning container). The following steps will help in troubleshooting:

  1. SSH to the master.
  2. Use the following command to upload relevant logs:
  • journalctl -u kubelet
  1. Attach the logs to a new Issue in this repository.

Validation Fails (One or more nodes are missing/unhealthy)

  1. Use kubectl get nodes to identify the missing nodes.
  2. Use vSphere Client or govc to find the node and the node's IP address.
  3. SSH to the master, then to the missing node
  4. Use the following command to upload relevant logs:
    • journalctl -u kubelet
  5. Attach the logs to a new Issue in this repository.

Validation Fails (Dashboard or other kubernetes services are not working)

This was be mostly likely flannel failure.

  1. Use kubectl describe pod dashboard-pod-name to identify the node on which dashboard pod is scheduled.
  2. Use vSphere Client or govc to find the node and the node's IP address.
  3. SSH to the node.
  4. Use the following command on node to upload relevant logs:
    • journalctl -u flannelc
  5. Attach the logs to a new Issue in this repository.