随笔分类 -  kubernetes

摘要:1. 修改配置文件 /etc/kubernetes/plugins/dns-cache/nodelocaldns.yaml sed 's/k8s.gcr.io/gcr.azk8s.cn\/google_containers/g s/__PILLAR__DNS__SERVER__/192.168.0. 阅读全文
posted @ 2022-08-25 10:29 LeoShi2020 阅读(436) 评论(0) 推荐(0) 编辑
摘要:kubectl edit cm coredns -n kube-system 删除 forward . /etc/resolv.conf { max_concurrent 1000 } 删除 pod 即可 阅读全文
posted @ 2022-08-25 10:21 LeoShi2020 阅读(1523) 评论(0) 推荐(0) 编辑
摘要:1. 为kubeadm添加变量 vi /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf Environment="KUBELET_NETWORK_ARGS network-plugin=cni --cni-conf-dir=/etc/ 阅读全文
posted @ 2022-08-12 23:20 LeoShi2020 阅读(4292) 评论(0) 推荐(0) 编辑
摘要:[root@master1 ~]# kubeadm init --kubernetes-version 1.24.3 --apiserver-advertise-address=0.0.0.0 --service-cidr=10.96.0.0/16 --pod-network-cidr=10.250 阅读全文
posted @ 2022-08-12 15:44 LeoShi2020 阅读(3040) 评论(0) 推荐(0) 编辑
摘要:操作命令 curl -L https://github.com/ahmetb/kubectx/releases/download/v0.9.1/kubens -o /bin/kubens chmod +x /bin/kubens kubens <命名空间名称> END 阅读全文
posted @ 2020-08-13 15:35 LeoShi2020 阅读(2250) 评论(0) 推荐(0) 编辑
摘要:查看容器资源报错 kubectl top nodes kubectl top pods [root@master ~]# kubectl top nodes Error from server (NotFound): the server could not find the requested r 阅读全文
posted @ 2020-08-12 09:54 LeoShi2020 阅读(7071) 评论(0) 推荐(0) 编辑
摘要:kubectl api-resources [root@master ~]# kubectl api-resources NAME SHORTNAMES APIGROUP NAMESPACED KIND bindings true Binding componentstatuses cs false 阅读全文
posted @ 2020-08-11 23:30 LeoShi2020 阅读(192) 评论(0) 推荐(0) 编辑
摘要:查看集群信息 kubectl cluster-info [root@master ~]# kubectl cluster-info Kubernetes master is running at https://10.2.30.171:6443 KubeDNS is running at https 阅读全文
posted @ 2020-08-11 23:26 LeoShi2020 阅读(1073) 评论(0) 推荐(0) 编辑
摘要:kubeadm token create --print-join-command [root@master ~]# kubeadm token create --print-join-command W0811 11:13:51.716068 18508 configset.go:202] WAR 阅读全文
posted @ 2020-08-11 23:15 LeoShi2020 阅读(3717) 评论(0) 推荐(0) 编辑
摘要:k8s命令补全 yum install -y bash-* \cp /etc/profile /etc/profile.bak sed -i '2a source <(kubectl completion bash)' /etc/profile source /etc/profile END 阅读全文
posted @ 2020-08-11 23:11 LeoShi2020 阅读(342) 评论(0) 推荐(0) 编辑
摘要:概念 什么是k8s 一组服务器集群 管理集群中各个节点的容器(最小单位是pod) 功能 自我修复 弹性伸缩: 根据服务器实际情况增加或减少容器数量 自动部署: 一键部署LAMP 回滚: 服务发现和负载均衡 机密和配置共享管理 k8s集群分为两类节点 Master node: 主节点,不跑服务 Wor 阅读全文
posted @ 2020-05-05 07:36 LeoShi2020 阅读(240) 评论(0) 推荐(0) 编辑
摘要:阿里源 END 阅读全文
posted @ 2020-05-02 06:34 LeoShi2020 阅读(972) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示