diff --git a/docs/getting-started-guides/ubuntu/troubleshooting.md b/docs/getting-started-guides/ubuntu/troubleshooting.md index e8c055b17a..44b3a34346 100644 --- a/docs/getting-started-guides/ubuntu/troubleshooting.md +++ b/docs/getting-started-guides/ubuntu/troubleshooting.md @@ -105,6 +105,102 @@ charm unit data, etc. Additional application-specific information may be included as well. ## Common Problems +### Load Balancer interfering with Helm + +This section assumes you have a working deployment of Kubernetes via Juju using a Load Balancer for the API, and that you are using Helm to deploy charts. + +To deploy Helm you will have run: + +``` +helm init +$HELM_HOME has been configured at /home/ubuntu/.helm +Tiller (the helm server side component) has been installed into your Kubernetes Cluster. +Happy Helming! +``` + +Then when using helm you may see one of the following errors: + +* Helm doesn't get the version from the Tiller server + +``` +helm version +Client: &version.Version{SemVer:"v2.1.3", GitCommit:"5cbc48fb305ca4bf68c26eb8d2a7eb363227e973", GitTreeState:"clean"} +Error: cannot connect to Tiller +``` + +* Helm cannot install your chart + +``` +helm install --debug +Error: forwarding ports: error upgrading connection: Upgrade request required +``` + +This is caused by the API load balancer not forwarding ports in the context of the helm client-server relationship. To deploy using helm, you will need to follow these steps: + +1. Expose the Kubernetes Master service + +``` +juju expose kubernetes-master +``` + +2. Identify the public IP address of one of your masters + +``` +juju status kubernetes-master +Model Controller Cloud/Region Version +production k8s-admin aws/us-east-1 2.0.0 + +App Version Status Scale Charm Store Rev OS Notes +flannel 0.6.1 active 1 flannel jujucharms 7 ubuntu +kubernetes-master 1.5.1 active 1 kubernetes-master jujucharms 10 ubuntu exposed + +Unit Workload Agent Machine Public address Ports Message +kubernetes-master/0* active idle 5 54.210.100.102 6443/tcp Kubernetes master running. + flannel/0 active idle 54.210.100.102 Flannel subnet 10.1.50.1/24 + +Machine State DNS Inst id Series AZ +5 started 54.210.100.102 i-002b7150639eb183b xenial us-east-1a + +Relation Provides Consumes Type +certificates easyrsa kubernetes-master regular +etcd etcd flannel regular +etcd etcd kubernetes-master regular +cni flannel kubernetes-master regular +loadbalancer kubeapi-load-balancer kubernetes-master regular +cni kubernetes-master flannel subordinate +cluster-dns kubernetes-master kubernetes-worker regular +cni kubernetes-worker flannel subordinate +``` + +In this context the public IP address is 54.210.100.102. + +If you want to access this data programmatically you can use the JSON output: + +``` +juju show-status kubernetes-master --format json | jq --raw-output '.applications."kubernetes-master".units | keys[]' +54.210.100.102 +``` + +3. Update the kubeconfig file + +Identify the kubeconfig file or section used for this cluster, and edit the server configuration. + +By default, it will look like ```https://54.213.123.123:443```. Replace it with the Kubernetes Master endpoint ```https://54.210.100.102:6443``` and save. + +Note that the default port used by CDK for the Kubernetes Master API is 6443 while the port exposed by the load balancer is 443. + +4. Start helming again! + +``` +helm install --debug +Created tunnel using local port: '36749' +SERVER: "localhost:36749" +CHART PATH: /home/ubuntu/.helm/ +NAME: +... +... + +``` ## etcd