故障排查
如何绕过 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 签发证书 新建

Kubernetes 1.6.0 安装问题汇总
· ☕ 1 分钟
1. CNI 问题 错误日志 1 2 journalctl -u kubelet ...Unable to update cni config: No networks found in /etc/cni/net.d 由于没有安装 CNI ,需要移除 /var/lib/kubelet/kubeadm-flags.env 参数中的--network-plugin=cni 1 2 cat /var/lib/kubelet/kubeadm-flags.env KUBELET_KUBEADM_ARGS="--cgroup-driver=systemd --pod-infra-container-image=k8s.gcr.io/pause:3.1" 2. 节点 NotReady 节点 NotReady 可能的原因有很多。通常会是网络、容器配置错误导致,需要逐一排查。 这里使用的是 使用 Kubeadm 安装 Kubernetes 集群 文