Cloud Director Explore the 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 VCD Cluster.
Explore the new Kubernetes cluster
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.
CODEdkp get kubeconfig -c ${CLUSTER_NAME} > ${CLUSTER_NAME}.conf
Verify the API server is up :
CODEkubectl --kubeconfig=${CLUSTER_NAME}.conf get nodes
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.
You should receive the following output:CODENAME STATUS ROLES AGE VERSION vcd-example-control-plane-9z77w Ready control-plane,master 4m44s v1.28.7 vcd-example-control-plane-rtj9h Ready control-plane,master 104s v1.28.7 vcd-example-control-plane-zbf9w Ready control-plane,master 3m23s v1.28.7 vcd-example-md-0-88c46 Ready <none> 3m28s v1.28.7 vcd-example-md-0-fp8s7 Ready <none> 3m28s v1.28.7 vcd-example-md-0-qvnx7 Ready <none> 3m28s v1.28.7 vcd-example-md-0-wjdrg Ready <none> 3m27s v1.28.7
List the Pods with the command:
CODEkubectl --kubeconfig=${CLUSTER_NAME}.conf get pods -A
The output has been shortened, but will resemble the following:
CODENAMESPACE NAME READY STATUS RESTARTS AGE calico-system calico-kube-controllers-577c696df9-v2nzv 1/1 Running 0 5m23s calico-system calico-node-4x5rk 1/1 Running 0 4m22s calico-system calico-node-cxsgc 1/1 Running 0 4m23s calico-system calico-node-dvlnm 1/1 Running 0 4m23s calico-system calico-node-h6nlt 1/1 Running 0 4m23s calico-system calico-node-jmkwq 1/1 Running 0 5m23s calico-system calico-node-tnf54 1/1 Running 0 4m18s calico-system calico-node-v6bwq 1/1 Running 0 2m39s calico-system calico-typha-6d8c94bfdf-dkfvq 1/1 Running 0 5m23s calico-system calico-typha-6d8c94bfdf-fdfn2 1/1 Running 0 3m43s calico-system calico-typha-6d8c94bfdf-kjgzj 1/1 Running 0 3m43s capa-system capa-controller-manager-6468bc488-w7nj9 1/1 Running 0 67s capg-system capg-controller-manager-5fb47f869b-6jgms 1/1 Running 0 53s capi-kubeadm-bootstrap-system capi-kubeadm-bootstrap-controller-manager-65ffc94457-7cjdn 1/1 Running 0 74s capi-kubeadm-control-plane-system capi-kubeadm-control-plane-controller-manager-bc7b688d4-vv8wg 1/1 Running 0 72s capi-system capi-controller-manager-dbfc7b49-dzvw8 1/1 Running 0 77s cappp-system cappp-controller-manager-8444d67568-rmms2 1/1 Running 0 59s capv-system capv-controller-manager-58b8ccf868-rbscn 1/1 Running 0 56s capz-system capz-controller-manager-6467f986d8-dnvj4 1/1 Running 0 62s capvcd-system capvcd-controller-manager-dbfc7b49-dzvw8 1/1 Running 0 77s cert-manager cert-manager-6888d6b69b-7b7m9 1/1 Running 0 91s kube-system cluster-autoscaler-7f695dc48f-v5kvh 1/1 Running 0 5m40s kube-system coredns-64897985d-hbkqd 1/1 Running 0 5m38s kube-system coredns-64897985d-m8g5j 1/1 Running 0 5m38s kube-system etcd-vcd-example-control-plane-9z77w 1/1 Running 0 5m32s kube-system etcd-vcd-example-control-plane-rtj9h 1/1 Running 0 2m37s kube-system etcd-vcd-example-control-plane-zbf9w 1/1 Running 0 4m17s kube-system kube-apiserver-vcd-example-control-plane-9z77w 1/1 Running 0 5m32s kube-system kube-controller-manager-vcd-example-control-plane-9z77w 1/1 Running 0 5m33s kube-system kube-proxy-gdkn5 1/1 Running 0 4m23s kube-system kube-scheduler-vcd-example-control-plane-zbf9w 1/1 Running 0 4m17s node-feature-discovery node-feature-discovery-master-7d5985467-lh7dc 1/1 Running 0 5m40s tigera-operator tigera-operator-5f9bdc5c59-j9tnr 1/1 Running 0 5m38s