随笔分类 -  CKA考题练习

摘要:kubectl get pods --show-labels # 查看标签用 --show-lables kubectl get pods --since=1 查看1分钟内的日志 查看某类标签的pod的日志 kubectl logs podname -c redis #pod 内有多个容器时用 -c 阅读全文
posted @ 2020-09-18 14:18 ucsgroup 阅读(9881) 评论(0) 推荐(0)
摘要:分析节点不是Ready 状态 1,kubelet 有问题 查看kubelet运行状态 systemctl status kubelet 2, 保证kubelet正常运行 systemctl start kubelet systemctl enable kubelet 阅读全文
posted @ 2020-09-13 22:32 ucsgroup 阅读(261) 评论(0) 推荐(0)
摘要:解答: kubectl drain 192.168.1.41 --ignore-daemonsets --delete-local-data 阅读全文
posted @ 2020-09-13 18:21 ucsgroup 阅读(155) 评论(0) 推荐(0)
摘要:题目理解: deploy > nginx-dns svc > nginx-dns 在busybox这个pod里用nslookup 能解析 svc 到pod 练习: busybox: wget https://kubernetes.io/examples/admin/dns/busybox.yaml 阅读全文
posted @ 2020-09-13 11:21 ucsgroup 阅读(165) 评论(0) 推荐(0)
摘要:这个题较简单,但一定要查看节点的Taints 解答: 1, kubectl get nodes | grep Ready 2, kubectl describe node nodename | grep Taint kubectl taint node node01 node-role.kubern 阅读全文
posted @ 2020-09-13 10:17 ucsgroup 阅读(163) 评论(0) 推荐(0)
摘要:答案: kubectl sacle deploy/deployname --replicas=n 阅读全文
posted @ 2020-09-13 09:52 ucsgroup 阅读(165) 评论(0) 推荐(0)