- Install tanzu
curl -H "Accept: application/vnd.github.v3.raw" -L https://api.github.com/repos/vmware-tanzu/community-edition/content/hack/get-tce-release.sh | bash -s v0.10.0 linux
This script requires
curl
,grep
,sed
,tr
, andjq
in order to work. To install any missing dependencies; examplesudo apt-get install jq
- Unpack the release
tar xzvf ./tce-linux-amd64-v0.10.0.tar.gz
- Run install script
cd tce-linux-amd64-v0.10.0/
./install.sh
verify installation
tanzu version
- Initialize the Tanzu Community Edition installer interface / Install Management Cluster
tanzu management-cluster create --ui
Visit UI @ http://127.0.0.1:8080
CLI cmd
tanzu management-cluster create mgmtcluster01 --file /home/shaunhess/.config/tanzu/tkg/clusterconfigs/8j4fjxjcwi.yaml -v 6
- Validate management cluster is started
tanzu management-cluster get
To delete management cluster
tanzu management-cluster delete
- Capture management cluster kubeconfig
tanzu management-cluster kubeconfig get <MGMT-CLUSTER-NAME> --admin
- Set your kubectl context to the management cluster.
kubectl config use-context <MGMT-CLUSTER-NAME>-admin@<MGMT-CLUSTER-NAME>
- Get nodes
kubectl get nodes
- Create workload cluster
tanzu cluster create <WORKLOAD-CLUSTER-NAME> --plan dev
Validate cluster started
tanzu cluster list
- Capture the workload cluster’s kubeconfig
tanzu cluster kubeconfig get <WORKLOAD-CLUSTER-NAME> --admin
- Set kubectl context
kubectl config use-context <WORKLOAD-CLUSTER-NAME>-admin@<WORKLOAD-CLUSTER-NAME>
- Get pods in cluster
kubectl get pods -A
- Get services in cluster
kubectl get svc -A
- CNI - Container Network Interface
- CPI - Cloud Provider Interface - CSI
- Container Storage Interface (Native storage interface for persistent storage)
East <--> West Traffic (Pod container communication)
- Antrea (VMware)
- Calico
- Multus (Multi-homed pods; pods with multiple network interfaces)
North <--> South Traffic (Layer 4 - External Traffic)
- kube-vip
- NSX
tanzu cluster create <cluster_name> -f ~/.config/tanzu/tkg/clusterconfigs/tcstemplate.yaml
tanzu cluster scale <cluster_name>> -w <num_of_worker_nodes>
tanzu package available list
tanzu package repository add <repo_name> --url <url> --names <pkg_name>
List installed packages
tanzu package repository list --all-namespaces
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
ingress.kubernetes.io/force-ssl-redirect: "true"
kubernetes.io/ingress.class: contour
kubernetes.io/tls-acme: "true"
spec:
tls:
- secretName: nginx-tls
hosts:
- nginx.mytanzu.com
rules:
- host: nginx.mytanzu.com
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: nginx
port:
number: 443