Add info on checking kubeconfig when migrating from RKE addon install

This commit is contained in:
Sebastiaan van Steenis
2018-12-03 15:07:08 -08:00
committed by Denise
parent 2e8655b892
commit a8af0c46a2
@@ -13,18 +13,27 @@ aliases:
The following instructions will help guide you through migrating from the RKE Add-on install to managing Rancher with the Helm package manager. The following instructions will help guide you through migrating from the RKE Add-on install to managing Rancher with the Helm package manager.
You will need the to have [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl) installed and `kube_config_rancher-cluster.yml` credentials file generated by RKE. You will need the to have [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl) installed and the kubeconfig YAML file (`kube_config_rancher-cluster.yml`) generated by RKE.
> **Note:** This guide assumes a standard Rancher install. If you have modified any of the object names or namespaces, please adjust accordingly. > **Note:** This guide assumes a standard Rancher install. If you have modified any of the object names or namespaces, please adjust accordingly.
### Point kubectl at your Rancher Cluster ### Point kubectl at your Rancher Cluster
Make sure `kubectl` is using the correct cluster. Export the `KUBECONFIG` environmental variable pointing at the `kube_config_rancher-cluster.yml` Make sure `kubectl` is using the correct kubeconfig YAML file. Set the `KUBECONFIG` environmental variable to point to `kube_config_rancher-cluster.yml`:
``` ```
export KUBECONFIG=$(pwd)/kube_config_rancher-cluster.yml export KUBECONFIG=$(pwd)/kube_config_rancher-cluster.yml
``` ```
After setting the `KUBECONFIG` environment variable, verify that it contains the correct `server` parameter. It should point directly to one of your cluster nodes on port `6443`.
```
kubectl config view -o=jsonpath='{.clusters[*].cluster.server}'
https://NODE:6443
```
If the output from the command shows your Rancher hostname with the suffix `/k8s/clusters`, the wrong kubeconfig YAML file is configured. It should be the file that was created when you used RKE to create the cluster to run Rancher.
### Save your certificates ### Save your certificates
If you have terminated ssl on the Rancher cluster ingress, recover your certificate and key for use in the Helm install. If you have terminated ssl on the Rancher cluster ingress, recover your certificate and key for use in the Helm install.
@@ -44,7 +53,7 @@ kubectl -n cattle-system get secret cattle-keys-server -o jsonpath --template='{
### Remove previous Kubernetes objects ### Remove previous Kubernetes objects
Remove the kubernetes objects created by the RKE install. Remove the Kubernetes objects created by the RKE install.
> **Note:** Removing these Kubernetes components will not affect the Rancher configuration or database, but with any maintenance it is a good idea to create a backup of the data before hand. See [Creating Backups-HA Install]({{< baseurl >}}/rancher/v2.x/en/backups/backups/ha-backups) for details. > **Note:** Removing these Kubernetes components will not affect the Rancher configuration or database, but with any maintenance it is a good idea to create a backup of the data before hand. See [Creating Backups-HA Install]({{< baseurl >}}/rancher/v2.x/en/backups/backups/ha-backups) for details.