Namespace

Namespaces provide a mechanism for isolating groups of resources within a single cluster. Create a namespace and make it the default context for all kubectl commands.

  1. Using kubectl, create the namespace.

    $ kubectl create ns my-cnf
    
  2. Confirm that the namespace has been created.

    $ kubectl get namespaces
    
  3. View the pods in the new namespace, by adding the –namespace argument.

    $ kubectl get pods --namespace my-cnf
    
  4. Permanently set the namespace for all subsequent kubectl commands in the my-cnf context.

    $ kubectl config set-context --current --namespace my-cnf
    
    $ kubectl get pods
    

To monitor the Kubernetes cluster, we will use the k9s tool. Open a new SSH window to the Mgmt Jumphost and launch k9s k9s