随笔分类 -  Kubenetes

摘要:获取节点列表 kubectl get nodes 设置node节点不可调度 kubectl cordon $node_name 驱逐节点上的pod kubectl drain $node_name --ignore-daemonsets --delete-local-data 删除节点 kubect 阅读全文
posted @ 2022-06-15 16:27 B_en′Pǎo 阅读(78) 评论(0) 推荐(0)
摘要:kubectl exec PODNAMME -nNAMESPACE -- tar cPf - /tmp/gc.log | sudo tar xf - -C .PODNAME:pod名字NAMESPACE:命名空间 阅读全文
posted @ 2022-06-06 17:24 B_en′Pǎo 阅读(445) 评论(0) 推荐(0)
摘要:需求 定时清理redis缓存 部署文件 apiVersion: batch/v1 kind: CronJob metadata: name: crontab-clear-redis namespace: ns-test spec: schedule: "10 16 * * 1" ##这里注意时区问题 阅读全文
posted @ 2022-04-19 22:43 B_en′Pǎo 阅读(300) 评论(0) 推荐(0)
摘要:部署环境 aws eks环境 sc是gp2 部署文件 apiVersion: apps/v1 kind: Deployment metadata: namespace: saas name: nexus3 labels: app: nexus3 spec: replicas: 1 selector: 阅读全文
posted @ 2022-04-19 22:35 B_en′Pǎo 阅读(165) 评论(0) 推荐(0)
摘要:需求:nginx 不但可以通过80访问还可以通过8089访问 istio ingressgateway修改创建指定端口的TCP转发 kubectl get svc -n istio-system kubectl edit svc -n istio-system istio-ingressgatewa 阅读全文
posted @ 2022-04-18 15:06 B_en′Pǎo 阅读(529) 评论(0) 推荐(0)
摘要:1. https://istio.io/latest/zh/docs/setup/getting-started/#download 安装参考文档 安装好istio 默认用的是alb 需要改成nlb kubectl get svc -n istio-systemkubectl edit svc -n 阅读全文
posted @ 2022-04-18 14:18 B_en′Pǎo 阅读(174) 评论(0) 推荐(0)
摘要:apiVersion: apps/v1 kind: DaemonSet metadata: name: nginx-daemonset labels: app: nginx spec: selector: matchLabels: app: nginx template: metadata: lab 阅读全文
posted @ 2022-04-13 20:55 B_en′Pǎo 阅读(56) 评论(0) 推荐(0)
摘要:一、docker启动prom docker run -d -p 9100:9100 -v /proc:/host/proc -v /sys:/host/sys -v /:/rootfs --net=host --restart=always prom/node-exporter --path.pro 阅读全文
posted @ 2022-01-24 23:20 B_en′Pǎo 阅读(126) 评论(0) 推荐(0)
摘要:此文章参考https://blog.51cto.com/wangpengtai/2418636?source=dra https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client 一、nfs服务器部署 阅读全文
posted @ 2021-07-16 14:06 B_en′Pǎo 阅读(567) 评论(0) 推荐(0)
摘要:$ kubectl api-resources | grep deployment deployments deploy apps true Deployment This means that only apiVersion with apps is correct for Deployments 阅读全文
posted @ 2021-06-24 09:31 B_en′Pǎo 阅读(1502) 评论(0) 推荐(1)