Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
ubuntu@onap-control-1:~$ mkdir .kube
ubuntu@onap-control-1:~$ mv kube_config_cluster.yml .kube/config.onap

Create a context file shell script in the onap-control-1 VM:

ubuntu@onap-control-1:~$ nano init.sh

Code Block
#!/bin/bash

export KUBECONFIG=~/.kube/config.onap
kubectl config use-context onap

Save the file.

Verify the kubectl:

load the onap context:

Note

Perform this everytime you want to perform helm or kubectl commands on the onap-control-1 node


Code Block
ubuntu@onap-control-1:~$ . init.sh 
Switched to context "onap".

Verify the cluster:

Code Block
ubuntu@onap-control-1:~$ kubectl get nodes -o=wide