复制在文件夹,在windows 环境变量中添加路径
测试 kubectl version --clientkubectl cluster-info 创建一个HTTP 服务器 kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10kubectl expose deployment hello-minikube --type=NodePort --port=8080hello-minikube Pod 开始运行,但是必须等到 Pod 启动 ,测试Pod是否运行
kubectl get pod以下两个状态一个创建过程中,一个已经成功运行
可以通过以下命令得到暴露的服务, 把获取的url 粘贴到浏览器能看到本地集群的细节
kubectl delete services hello-minikube
kubectl delete deployment hello-minikube
开启第二个终端窗口去运行代理,代理可以通过CTRL+C的方式终止
kubectl proxy 使用 kubectl 进行故障排除 kubectl get - 列出资源kubectl describe - 显示有关资源的详细信息kubectl logs - 打印 pod 和其中容器的日志kubectl exec - 在 pod 中的容器上执行命令kubectl get nodes查看node节点信息kubectl describe node k8s-node-01查看某个node的详细信息 删除的方法1、先删除pod
2、再删除对应的deployment