在Ubuntu上调试Kubernetes可参考以下方法:
kubectl logs pod_name查看容器日志,-f参数可实时跟踪。kubectl exec -it pod_name -- /bin/bash进入容器,执行命令排查问题。kubectl-debug插件,通过kubectl debug -it pod_name --image=busybox启动临时容器调试。kubectl describe pod查看Pod状态、事件及资源使用情况。kubectl get nodes/pods/events检查节点健康、Pod调度及异常事件。