General Troubleshooting - Server in Kubernetes Cluster



  • Make all future commands in the context of the relevant Namespace:

Find-and-replace $NAMESPACE with the relevant Namespace

kubectl config set-context --current --namespace='$NAMESPACE'
  • Get a list of vFunction Pod IDs with status:
kubectl get pods
  • Get the logs from one vFunction Pod:

Find-and-replace $POD_ID with the relevant Pod, such as vfunction-mysql-AA1234A

kubectl logs $POD_ID
  • Open Bash inside a Pod
kubectl exec -it $POD_ID bash
  • Get events in the Namespace sorted chronologically:
kubectl get event --sort-by='.metadata.managedFields[0].time'
  • Modify an existing Deployment to, for example, modify the Pod Resource Limits on-the-fly:

Find-and-replace $DEPLOYMENT_NAME with the relevant deployment, such as vfunction-mysql

KUBE_EDITOR="vi" kubectl edit deployment $DEPLOYMENT_NAME
  • Get Resource Utilization every 5 seconds for 10 minutes on one Pod:

Find-and-replace $POD_ID with the relevant Pod, such as vfunction-mysql-AA1234A

for i in {1..120}; do kubectl top pod $POD_ID >> /tmp/$POD_ID.txt; sleep 5; done
  • Get Information about a Persistent Volume Claim

Find-and-replace $CLAIM_NAME with the relevant CLAIM, such as vfunction-mysql-pvc / vfunction-storage-pvc

kubectl describe pvc $CLAIM_NAME
  • Get Information about a Persistent Volume

Find-and-replace $VOLUME_NAME with the relevant CLAIM, such as vfunction-mysql-vol / vfunction-storage-vol

kubectl describe pv $VOLUME_NAME
  • Check the Available Storage for a Persistent Volume
### 1. Find the Storage Pod
kubectl get pods

### 2. Open Bash in the Storage Pod
kubectl exec -it $VFUN_STORAGE_POD_ID

### 3. Check the Disk Space in /home/storage/storage
df -h

  • Delete a single Pod to restart it:
kubectl delete pod $POD_ID
  • Delete all Pods:

Find-and-replace $NAMESPACE with the relevant Namespace

kubectl delete pods --all -n $NAMESPACE

  • Uninstall the vFunction Server:

Find-and-replace $NAMESPACE with the relevant Namespace

helm uninstall vfunction-server -n $NAMESPACE
  • Manually install the vFunction Server via Helm:

Find-and-replace $NAMESPACE with the relevant Namespace

helm install --wait --namespace $NAMESPACE --values vfunction-server-for-kubernetes/config/helm/custom-values.yaml vfunction-server vfunction-server-for-kubernetes/helm/server-chart.tgz
  • Manually upgrade the vFunction Server via Helm:

Find-and-replace $NAMESPACE with the relevant Namespace

helm upgrade --install --wait --namespace $NAMESPACE --values vfunction-server-for-kubernetes/config/helm/custom-values.yaml vfunction-server vfunction-server-for-kubernetes/helm/server-chart.tgz