Opting out of remote health reporting

The procedure to opt out of remote health reporting is as follows.

Procedure
  1. Log in to cluster as a default system user by exporting the cluster kubeconfig file:
    export KUBECONFIG=/var/nps/ISO/ign_config/auth/kubeconfig
  2. Extract the pull secret used during deployment:
    oc extract secret/pull-secret -n openshift-config --to=<absolute_path>

    Where <absolute_path> is any directory path. The pull secret is saved to .dockerconfigjson in the specified directory.

  3. Make a copy of extracted pull secret using the following command:
    cp .dockerconfigjson new-pull-secret.yaml
  4. Modify the new-pull-secret.yaml pull secret to remove cloud.openshift.com entry.
    Sample example follows:

    Sample: Before

    Sample: After

  5. Insert the updated Pull secret file back into the cluster using the following command:
    oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=new-pull-secret.yaml
    NOTE:

    This update is rolled out to all nodes, which can take 15 to 20 minutes depending on the size of your cluster. During this time, nodes are drained and Pods are rescheduled on the remaining nodes.

    Sample

    [root@bastion post]# oc get nodes
    NAME                  STATUS                    ROLES   AGE  VERSION
    master0.ocp4.nfv.com  Ready,SchedulingDisabled  master  47h  v1.16.2+45a4ac4
    master1.ocp4.nfv.com  Ready                     master  47h  v1.16.2+45a4ac4
    master2.ocp4.nfv.com  Ready                     master  47h  v1.16.2+45a4ac4
    worker0.ocp4.nfv.com  Ready,SchedulingDisabled  worker  47h  v1.16.2+45a4ac4
    worker1.ocp4.nfv.com  Ready                     worker  47h  v1.16.2+45a4ac4
    [root@bastion post]# oc get pods
    NAME                       READY  STATUS   RESTARTS  AGE
    console-7fdb97d767-jdzdw   0/1    Running  0         2m58s
    console-b67d5c595-fbxdk    0/1    Running  1         5m21s
    console-b67d5c595-sstpz    0/1    Running  0         2m58s
    downloads-df59f64db-52s94  1/1    Running  0         5m21s
    downloads-df59f64db-tnb2t  1/1    Running  0         2m58s