故障排查
Kubernetes 系统下的 `rm -rf /`执行完就可以跑路了
· ☕ 2 分钟
本文档主要用于展示 Docker 特权模式的危害,请谨慎操作。对于没有 CLI 操作权限的用户,可以拷贝示例的 Yaml,直接创建集群负载 Pod、Job、DaemonSet 等进行操作。 1. 直接删除全部资源 如果能登陆机器,收拾好东西,执行命令: 1 kubectl delete all --all --all-namespaces 但是也有可能

如何绕过 DockerHub 拉取镜像限制
· ☕ 3 分钟
1. DockerHub 限制 终究还是绕不过下面这个报错: 1 Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit DockerHub 从 2020 年 11 月 2 日,正式开始限制非付费用户的拉取频率: 匿名用户,每 6 小时只允许 pull 100 次 已登录用户,每 6 小时只允许 pull 200 次 好吧,正常情况下,到这里就友尽了,不让用就不

Surface 触控笔失灵
· ☕ 1 分钟
最近用 Surface ,找出触控笔发现没电。换了一个 AAAA 电池,又发现笔尖触控失效。 网上很多文档介绍的是卸载 Marvell AVASTAR Bluetooth ,重启生效。但这种方法对我无效,卸载 Precise Touch Device 之后反而生效。 在设备管理里面找到下图选项,右键卸载,不用勾选删除,直接确定,然后重启生效。

KubeSpray 安装 Kubernetes 报错 ip in ansible_all_ipv4_addresses
· ☕ 2 分钟
使用 KubeSpray 安装 Kubernetes 时,报错 1 2 3 4 5 6 fatal: [node0]: FAILED! => { "assertion": "ip in ansible_all_ipv4_addresses", "changed": false, "evaluated_to": false, "failed": true } 查看 inventory.ini 配置 1 2 3 4 5 6 7 cat inventory.ini # ## Configure 'ip' variable to bind kubernetes services on a # ## different ip than the default iface # ## We should set etcd_member_name for etcd cluster. The node that is not a etcd member do not need to set the value, or can set the empty string value. [all] node0 ansible_host=139.168.12.4 ip=139.168.12.4 ... 查找报错信息来源 kubespray/extra_playbooks/roles/network_plugin/calico/tasks/pre.yml 1 2 3 4 5 6 7 8 9 ---

Kubernetes 签发 Ingress 证书及日常故障运维
· ☕ 2 分钟
1. 自动签发 Ingress 证书 安装 cert-manager 1 2 3 4 5 6 7 8 9 10 kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.10/deploy/manifests/00-crds.yaml kubectl create namespace cert-manager kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true helm repo add jetstack https://charts.jetstack.io helm repo update helm install \ --name cert-manager \ --namespace cert-manager \ --version v0.10.0 \ jetstack/cert-manager 创建一个全局的签发机构 新建文件 issuer.yaml 1 2 3 4 5 6 7 8 9 10 11 12 apiVersion: certmanager.k8s.io/v1alpha1 kind: ClusterIssuer metadata: name: letsencrypt-prod namespace: cert-manager spec: acme: server: https://acme-v02.api.letsencrypt.org/directory email: admin@domain.com privateKeySecretRef: name: letsencrypt-prod http01: {} 创建签发机构 1 kubectl apply -f issuer.yaml 签发证书 新建