Explore New Cluster

Learn to interact with your Kubernetes cluster

This guide explains how to use the command line to interact with your newly-deployed Kubernetes cluster.

Before you start, make sure you have created a workload cluster, as described in Create a New Cluster.

Explore the new Kubernetes cluster

  1. Get a kubeconfig file for the workload cluster:

    When the workload cluster is created, the cluster lifecycle services generate a kubeconfig file for the workload cluster, and writes it to a Secret. The kubeconfig file is scoped to the cluster administrator.

    Get the kubeconfig from the Secret, and write it to a file, using this command:

    dkp get kubeconfig -c ${CLUSTER_NAME} > ${CLUSTER_NAME}.conf
    
  2. List the Nodes using the command:

    kubectl --kubeconfig=${CLUSTER_NAME}.conf get nodes
    

    The output appears similar to:

    NAME                                   STATUS   ROLES                  AGE     VERSION
    my-azure-cluster-control-plane-t6pzx   Ready    control-plane,master   8m17s   v1.21.6
    my-azure-cluster-md-0-hvg4b            Ready    <none>                 6m17s   v1.21.6
    

    NOTE: It may take a few minutes for the Status to move to Ready while the Pod network is deployed. The Node's Status should change to Ready soon after the calico-node DaemonSet Pods are Ready.

  3. List the Pods using this command:

    kubectl --kubeconfig=${CLUSTER_NAME}.conf get --all-namespaces pods
    

    The output appears similar to:

    NAMESPACE                           NAME                                                                 READY   STATUS    RESTARTS   AGE
    calico-system                       calico-kube-controllers-f95867bfb-4vxzz                              1/1     Running   0          124m
    calico-system                       calico-node-xjqkq                                                    1/1     Running   0          124m
    calico-system                       calico-node-z2h7c                                                    1/1     Running   0          120m
    calico-system                       calico-typha-74b6bbd989-5d8lb                                        1/1     Running   0          124m
    calico-system                       calico-typha-74b6bbd989-zxd94                                        1/1     Running   0          120m
    capa-system                         capa-controller-manager-7cbc764d6b-5fcb8                             2/2     Running   0          12m
    capi-kubeadm-bootstrap-system       capi-kubeadm-bootstrap-controller-manager-6cf88b5459-cr46w           2/2     Running   0          12m
    capi-kubeadm-control-plane-system   capi-kubeadm-control-plane-controller-manager-86f749cf89-dj6vp       2/2     Running   0          12m
    capi-system                         capi-controller-manager-7c9ff4ddc7-wdz8s                             2/2     Running   0          12m
    capi-webhook-system                 capa-controller-manager-5848b6b65b-plfbv                             2/2     Running   0          12m
    capi-webhook-system                 capi-controller-manager-54bf59bd8d-9jv5s                             2/2     Running   0          12m
    capi-webhook-system                 capi-kubeadm-bootstrap-controller-manager-65c99884-7lcrc             2/2     Running   0          12m
    capi-webhook-system                 capi-kubeadm-control-plane-controller-manager-5869f67c96-qkhcn       2/2     Running   0          12m
    capi-webhook-system                 capz-controller-manager-55557b6cdf-29kjf                             2/2     Running   0          12m
    capz-system                         capz-controller-manager-5b98d9756d-vlgxz                             2/2     Running   0          11m
    capz-system                         capz-nmi-tbpmr                                                       1/1     Running   0          11m
    cert-manager                        cert-manager-86cb5dcfdd-f8zb5                                        1/1     Running   0          13m
    cert-manager                        cert-manager-cainjector-84cf775b89-cdwfk                             1/1     Running   0          13m
    cert-manager                        cert-manager-webhook-5d5dc765f6-29qqq                                1/1     Running   0          13m
    kube-system                         coredns-74ff55c5b-9xdnd                                              1/1     Running   0          127m
    kube-system                         coredns-74ff55c5b-xfkww                                              1/1     Running   0          127m
    kube-system                         ebs-csi-controller-9c4b68678-2tmpx                                   4/4     Running   0          125m
    kube-system                         ebs-csi-controller-9c4b68678-lgvnm                                   4/4     Running   0          125m
    kube-system                         ebs-csi-node-7phdg                                                   3/3     Running   0          125m
    kube-system                         ebs-csi-node-d9m6p                                                   3/3     Running   0          120m
    kube-system                         etcd-ip-10-0-126-209.us-west-2.compute.internal                      1/1     Running   0          127m
    kube-system                         kube-apiserver-ip-10-0-126-209.us-west-2.compute.internal            1/1     Running   0          127m
    kube-system                         kube-controller-manager-ip-10-0-126-209.us-west-2.compute.internal   1/1     Running   0          127m
    kube-system                         kube-proxy-744s5                                                     1/1     Running   0          127m
    kube-system                         kube-proxy-hsmmr                                                     1/1     Running   0          120m
    kube-system                         kube-scheduler-ip-10-0-126-209.us-west-2.compute.internal            1/1     Running   0          127m
    tigera-operator                     tigera-operator-675ccbb69c-2cwpn                                     1/1     Running   0          125m