I’ll try and maintain a list of commands that I use frequently for interacting with the tanzu cli and the kubectl cli. Probably also some helm commands.
Tanzu CLI Commands
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ############################## ##### Initialize Cluster ##### ############################## tanzu init ############################## #### Tanzu UI Deployment ##### ############################## tanzu management-cluster create --ui --bind "0.0.0.0:8080" ############################## ####### Switch Context ####### ############################## tanzu management-cluster kubeconfig get --admin kubectl config use-context management-cluster-1-admin@management-cluster-1 tanzu cluster kubeconfig get guest-cluster-1 --admin kubectl config use-context guest-cluster-1-admin@guest-cluster-1 ############################## #### Mgmt Cluster Status ##### ############################## tanzu management-cluster get ############################## #### Guest Cluster Status #### ############################## tanzu cluster get guest-cluster-1 ############################## #### Delete Mgmt Cluster ##### ############################## tanzu management-cluster delete ############################## #### Delete Guest Cluster #### ############################## tanzu cluster delete guest-cluster-1 |
Kubectl Commands
1 2 3 4 5 6 7 8 9 10 | ############################## #### Edit AKO Config Map ##### ############################## kubectl edit cm -n avi-system ############################## ####### Troubleshooting ###### # Modify the file path to your context ############################## kubectl get po,deploy,cluster,kubeadmcontrolplane,machine,machinedeployment -A --kubeconfig /root/ .kube-tkg /tmp/config_IT8nYmgN |
Helm Commands
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ############################## ### cat Values into a file ### # Select version ############################## helm show values ako /ako --version 1.7.1 > values.yaml ############################## ###### Update AKO Repo ####### ############################## helm repo update helm search repo ############################## ##### Deploy AKO on Guest #### # Select version and modify the values.yaml file ############################## kubectl create ns avi-system helm install ako /ako --generate-name --version 1.7.2 -f ako_values.yaml -n avi-system ############################## ######### Delete AKO ######### ############################## helm delete $(helm list -n avi-system -q) -n avi-system |