Upgrading Flannel

Upgrade Flannel in the Kubernetes cluster by removing all the Flannel components and installing the Flannel application from the application catalog.

  1. Check the Flannel version.
    kubectl describe pod --namespace kube-system kube-flannel

    Enter the Tab key to auto complete the name of the kube-flannel pod.

    The output contains the Image option, which shows the Flannel version, for example:

    Image: container-registry.oracle.com/olcne/flannel:v0.14.1-4
  2. Delete the Flannel DaemonSet.
    kubectl delete daemonsets kube-flannel-ds --namespace kube-system
  3. Delete the Flannel ServiceAccount.
    kubectl delete serviceaccounts flannel --namespace kube-system
  4. Delete the Flannel ConfigMap.
    kubectl delete configmap kube-flannel-cfg --namespace kube-system
  5. Delete the Flannel ClusterRole.
    kubectl delete clusterrole flannel --namespace kube-system
  6. Delete the Flannel ClusterRoleBinding.
    kubectl delete clusterrolebinding flannel --namespace kube-system
  7. Install Flannel from the application catalog.
    ocne application install --name flannel --release flannel --namespace kube-flannel
  8. Validate the Flannel installation.
    kubectl describe pod --namespace kube-flannel kube-flannel

    Enter the Tab key to auto complete the name of the kube-flannel pod.

    The output contains the Image option, which shows the Flannel version, is now flannel:current. For example:

    Image: container-registry.oracle.com/olcne/flannel:current