随笔分类 -  kubernetes

摘要:查看节点名称:kubectl get nodes 为节点添加标签:kubectl label nodes node2 nodeenv=test 定向调度:1、根据NodeName调度2、根据Label调度 nodename调度栗子:spec: containers: - name: nginx im 阅读全文
posted @ 2021-06-21 00:07 丑矬穷屌 阅读(64) 评论(0) 推荐(0)
摘要:钩子:post start:容器启动后钩子(容器启动后执行的操作,失败重启容器)pre stop:容器终止前钩子(容器删除时执行的操作,失败阻塞容器删除) exec命令方式栗子:lifecycle: (在容器行里面,与容器名称行对齐) postStart: exec: command: - cat 阅读全文
posted @ 2021-06-20 23:14 丑矬穷屌 阅读(83) 评论(0) 推荐(0)
摘要:apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: psp.flannel.unprivileged annotations: seccomp.security.alpha.kubernetes.io/allowedP 阅读全文
posted @ 2021-06-11 00:46 丑矬穷屌 阅读(424) 评论(0) 推荐(0)
摘要:apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: psp.flannel.unprivileged annotations: seccomp.security.alpha.kubernetes.io/allowedP 阅读全文
posted @ 2021-06-11 00:34 丑矬穷屌 阅读(426) 评论(0) 推荐(0)
摘要:系统环境 #master、node节点都执行 #1、检查系统版本(7.5以上)cat /etc/redhat-release #2、主机名解析vim /etc/hosts 192.168.109.100 master192.168.109.101 node1192.168.109.102 node2 阅读全文
posted @ 2021-06-11 00:32 丑矬穷屌 阅读(115) 评论(0) 推荐(0)