Troubleshooting vSphere 7 with Kubernetes (Tanzu) installation

Introduction

Troubleshooting WCP vCenter Service

Troubleshooting Supervisor Cluster Control Plane

# Use the command to authenticate to the Supervisor Cluster
kubectl vsphere login — server Supervisor-Cluster-API-endpoint — vsphere-username administrator@vsphere.local
# Get events logged by the control plane
kubectl get events -A or kubectl get events -n namespaces
# Get logs of various applications/pods running in the control plane
kubectl logs -n namespace pod-name
Read key from fileConnected to PSQLCluster: domain-c8:bf950692-ec28-45cf-9228-13ce8e607244
IP: 192.168.10.40
PWD: WUwoRDlAY.....u9Aywjd1Ex8W/ZzqHQjC3NX7pyFv7IXhNyJ8CTvE08=
------------------------------------------------------------

Troubleshooting Tanzu Kubernetes Cluster Service

kubectl vsphere login --server Supervisor-Cluster-API-endpoint --vsphere-username sso-user-name --insecure-skip-tls-verify --tanzu-kubernetes-cluster-name tkc-cluster-name --tanzu-kubernetes-cluster-namespace tkc-cluster-namespace
cat <<EOM > jumpbox.yaml
---
apiVersion: v1
kind: Pod
metadata:
name: jumpbox
namespace: tkc-namespace
spec:
containers:
- image: "photon:3.0"
name: jumpbox
command: [ "/bin/bash", "-c", "--" ]
args: [ "yum install -y openssh-server; mkdir /root/.ssh; cp /root/ssh/ssh-privatekey /root/.ssh/id_rsa; chmod 600 /root/.ssh/id_rsa; while true; do sleep 30; done;" ]
volumeMounts:
- mountPath: "/root/ssh"
name: ssh-key
readOnly: true
volumes:
- name: ssh-key
secret:
secretName: tkc-cluster-name-ssh
EOM
kubectl apply -f jumpbox.yaml
for node in `kubectl get tkc tkc-cluster-name  -n tkc-namespace -o json|jq -r '.status.nodeStatus| keys[]'`
do
ip=`kubectl get virtualmachines -n tkc-namespace ${node} -o json|jq -r '.status.vmIp'`
echo ${ip}
done
kubectl -n tkc-namespace exec -it jumpbox -- /usr/bin/ssh -o StrictHostKeyChecking=no vmware-system-user@${ip}
kubectl get secret -n tkc-namespace tkc-cluster-name-ssh -o json |jq -r '.data."ssh-privatekey"'|base64 -d > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
for node in `kubectl get tkc tkc-cluster-name  -n tkc-namespace -o json|jq -r '.status.nodeStatus| keys[]'`
do
ip=`kubectl get virtualmachines -n tkc-namespace ${node} -o json|jq -r '.status.vmIp'`
echo ${ip}
done
ssh -o StrictHostKeyChecking=no vmware-system-user@${ip}

Troubleshooting Registry service

kubectl get namespace |grep vmware-system-registry# Replace xxxxxxxx with the registry ID found in the previous step
kubectl get secrets -n vmware-system-registry-xxxxxxxx harbor-xxxxxxxx-controller-registry '.data.harborAdminPassword'|base64 -d|base64 -d;echo