Restart the ovnkube-master pod

To replace the ovnkube-master pod with a new instance on MicroShift, you can delete the existing pod in the openshift-ovn-kubernetes namespace. Confirm that a new pod appears when you list pods in that namespace.

Prerequisites
  • The OpenShift CLI (oc) is installed.

  • You have root access to the node.

  • A node installed on infrastructure configured with the OVN-Kubernetes network plugin.

  • The KUBECONFIG environment variable is set.

Procedure
  1. Access the remote node by running the following command:

    $ export KUBECONFIG=$PWD/kubeconfig
  2. Find the name of the ovnkube-master pod that you want to restart by running the following command:

    $ pod=$(oc get pods -n openshift-ovn-kubernetes | awk -F " " '/ovnkube-master/{print $1}')
  3. Delete the ovnkube-master pod by running the following command:

    $ oc -n openshift-ovn-kubernetes delete pod $pod
  4. Confirm that a new ovnkube-master pod is running by using the following command:

    $ oc get pods -n openshift-ovn-kubernetes

    The listing of the running pods shows a new ovnkube-master pod name and age.