Upgrade the Kubernetes cluster

NOTE: This will tear down the cluster you currently have.

If you want to upgrade your cluster to a new version of Kubernetes, follow these steps:

  • Download the latest version of Kubernetes from its Github release page.

  • Extract the downloaded tarball.

    $ tar xf kubernetes.tar.gz
  • Execute the following script to obtain the Kubernetes binaries.

    $ cd kubernetes/client
    $ ./get-kube-binaries
    $ cd ../..
  • Extract the downloaded kube binaries.

    $ cd kubernetes/server
    $ tar xf kubernetes-server-linux-amd64.tar.gz
    $ cd ../..
  • Copy the following binaries to /opt/bitnami/kubernetes/bin.

    $ sudo cp kubeadm kubelet kubectl /opt/bitnami/kubernetes/bin
  • Initialize the cluster.

    $ kubeadm init
  • Stop the recently created cluster.

    $ systemctl stop kubelet
  • Enable the PersistentLocalVolume alpha feature gate in /etc/kubernetes/manifests/kube-apiserver.yaml, /etc/kubernetes/manifests/kube-scheduler.yaml and /etc/kubernetes/manifests/kube-controller.yaml by adding the following line inside the command section:

  • Start the cluster.

    $ sudo /opt/bitnami/ start kubeadm
  • If you want the extra elements included in Bitnami Kubernetes Sandbox Stack, apply the manifests found in /opt/bitnami/kubernetes/manifests.

     # Weave
     $ kubectl create -f weave-net.yaml
     # Ingress
     $ kubectl create -f nginx-ingress-controller-rbac.yaml
     $ kubectl create -f nginx-ingress-controller.yaml
     # Heapster and Grafana
     $ kubectl create -f heapster.yaml
     $ kubectl create -f heapster-rbac.yaml
     $ kubectl create -f influxdb.yaml
     $ kubectl create -f grafana.yaml
     # Kubernetes Dashboard
     $ kubectl create -f kubernetes-dashboard.yaml
     $ kubectl create secret generic basic-auth --from-file=/opt/bitnami/kubernetes/auth
     $ kubectl create -f kubernetes-dashboard-ingress.yaml
     # Local Volume Provisioner
     $ kubectl create -f local-volume-config.yaml
     $ kubectl create -f local-volume-storageclass.yaml
     $ kubectl create -f local-volume-bootstrapper-admin-account.yaml
     $ kubectl create -f local-volume-bootstrapper.yaml
Last modification September 4, 2018