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 write 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 this command:

    kubectl --kubeconfig=${CLUSTER_NAME}.conf get nodes
    NAME                                         STATUS   ROLES    AGE   VERSION
    ip-10-0-115-179.us-west-2.compute.internal   Ready    <none>   13m   v1.21.5-eks-bc4871b
    ip-10-0-117-5.us-west-2.compute.internal     Ready    <none>   12m   v1.21.5-eks-bc4871b
    ip-10-0-81-221.us-west-2.compute.internal    Ready    <none>   12m   v1.21.5-eks-bc4871b
    ip-10-0-94-48.us-west-2.compute.internal     Ready    <none>   12m   v1.21.5-eks-bc4871b

    NOTE: It may take a few minutes for the Status to move to Ready while the Pod network is deployed. The Nodes' 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
    NAMESPACE                           NAME                                                                 READY   STATUS    RESTARTS   AGE
    calico-system            calico-kube-controllers-6b48c9575d-pvc4w        1/1     Running    0          3m51s
    calico-system            calico-node-4z2cn                               1/1     Running    0          3m51s
    calico-system            calico-node-6j6jt                               1/1     Running    0          3m47s
    calico-system            calico-node-cdzzs                               1/1     Running    0          3m49s
    calico-system            calico-node-ln74k                               1/1     Running    0          3m50s
    calico-system            calico-typha-578fc65f-82cdb                     1/1     Running    0          3m43s
    calico-system            calico-typha-578fc65f-mg59n                     1/1     Running    0          3m51s
    calico-system            calico-typha-578fc65f-qvxnl                     1/1     Running    0          3m43s
    kube-system              cluster-autoscaler-b4789f4bf-ds44f              0/1     Init:0/1   0          4m41s
    kube-system              coredns-85d5b4454c-hjp4h                        1/1     Running    0          7m41s
    kube-system              coredns-85d5b4454c-j26c5                        1/1     Running    0          7m41s
    kube-system              kube-proxy-bwl8s                                1/1     Running    0          3m53s
    kube-system              kube-proxy-gf9sr                                1/1     Running    0          3m49s
    kube-system              kube-proxy-mwcw9                                1/1     Running    0          4m2s
    kube-system              kube-proxy-p5hmm                                1/1     Running    0          3m47s
    node-feature-discovery   node-feature-discovery-master-65dc499cd-c867m   1/1     Running    0          4m44s
    node-feature-discovery   node-feature-discovery-worker-c72vn             1/1     Running    0          3m29s
    node-feature-discovery   node-feature-discovery-worker-n57p9             1/1     Running    0          3m27s
    node-feature-discovery   node-feature-discovery-worker-v7v6q             1/1     Running    0          3m42s
    node-feature-discovery   node-feature-discovery-worker-zd7lf             1/1     Running    0          3m33s
    tigera-operator          tigera-operator-59f4845b57-b5ltk                1/1     Running    0          4m42s