Skip to content

Matt Adam

Tech Blog

Menu
  • Home
  • Home Lab
    • Home Lab – Gen 1
    • Home Lab – Gen 2
    • Home Lab – Gen 3
  • VMware
    • VMware Cloud Foundation (VCF)
    • Avi Networks
  • Kubernetes
    • Openshift
    • K3s
    • Tanzu
      • Tanzu – TKGs (WCP)
      • Tanzu – TKG (TKGm)
    • Avi Kubernetes Operator (AKO)
  • About
  • Privacy Policy
Menu

Useful Tanzu / Kubectl Commands

Posted on September 8, 2022 by Matt Adam

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.

Table of Contents

Toggle
  • Tanzu CLI Commands
  • Kubectl Commands
  • Helm Commands

Tanzu CLI Commands

##############################
##### 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

##############################
#### 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

##############################
### 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

Social Media

  • LinkedIn
  • X
  • Bluesky
  • Mastodon

Recent Posts

  • Financial Solutions for ETF share classes
  • Power Consumption Tips for Efficient Home Labs: Save Energy, Save Money
  • Automating Deployments with Terraform in a Home Lab: A Simple Guide for Tech Tinkerers
  • Backup Strategies for Home Lab Data: A Beginner’s Guide to Keeping Your Files Safe
  • Home Lab Monitoring with Grafana and Prometheus: How to Track Your Systems Like a Pro
© 2026 Matt Adam | Powered by Minimalist Blog WordPress Theme