首页 > 其他分享 >K8S二进制搭建问题云集

K8S二进制搭建问题云集

时间:2022-10-19 14:47:34浏览次数:76  
标签:k8s https 二进制 192.168 failed io K8S calico 搭建

一、故障描述

Error from server: Get "https://k8s-node01:10250/containerLogs/kube-system/calico-node-98cv6/calico-node": x509: certificate signed by unknown authority
# 解决方案
kubelet 启动参数未设置
rotateCertificates: true
serverTLSBootstrap: true

 

二、故障描述

[ERROR][10] startup/startup.go 154: failed to query kubeadm's config map error=Get "https://172.16.0.1:443/api/v1/namespaces/kube-system/configmaps/kubeadm-config?timeout=2s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2021-09-16 03:48:26.374 [WARNING][10] startup/utils.go 48: Terminating
# 解决方案
kind: DaemonSet
metadata:
name: calico-node
containers:
env:
# 增加如下配置
# kubernetes service host ip address
- name: KUBERNETES_SERVICE_HOST
value: "192.168.0.250"
- name: KUBERNETES_SERVICE_PORT
value: "6443"
- name: KUBERNETES_SERVICE_PORT_HTTPS
value: "6443"

三、故障描述

Error from server (BadRequest): container "calico-node" in pod "calico-node-gn4p7" is waiting to start: PodInitializing
# 故障原因排查
kubectl describe -n kube-system po calico-node-gn4p7
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 10m default-scheduler Successfully assigned kube-system/calico-node-gn4p7 to 192.168.0.246
Warning FailedCreatePodSandBox 24s (x15 over 10m) kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to get sandbox image "k8s.gcr.io/pause:3.2": failed to pull image "k8s.gcr.io/pause:3.2": failed to pull and unpack image "k8s.gcr.io/pause:3.2": failed to resolve reference "k8s.gcr.io/pause:3.2": failed to do request: Head "https://k8s.gcr.io/v2/pause/manifests/3.2": dial tcp 108.177.97.82:443: i/o timeout

# 解决方案
ctr -n k8s.io i pull docker.io/juestnow/pause-amd64:3.2
ctr -n k8s.io i tag docker.io/juestnow/pause-amd64:3.2 k8s.gcr.io/pause:3.2

四、故障描述

Failed to watch *v1.Pod: failed to list *v1.Pod: Get "https://172.16.0.1:443/api/v1/pods?limit=500&resourceVersion=0": dial tcp 172.16.0.1:443: i/o timeout
kind: Deployment
metadata:
name: calico-kube-controllers
containers:
env:
# 增加如下配置
# kubernetes service host ip address
- name: KUBERNETES_SERVICE_HOST
value: "192.168.0.250"
- name: KUBERNETES_SERVICE_PORT
value: "6443"
- name: KUBERNETES_SERVICE_PORT_HTTPS
value: "6443"

五、故障描述

Error while dialing dial tcp: address https://192.168.0.242:2379 : too many colons in address

# 解决方案
vim calico.yaml
etcd_endpoints: "https://192.168.0.240:2379,https://192.168.0.241:2379,https://192.168.0.242:2379"

-------不要怀疑,就是配置文件中的etcd_endpoint多了一个空格------

六、故障描述

Warning FailedCreatePodSandBox 2m6s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "2ff4a45151e84e254bb11b96c02e68f3a0d610e75edc89337d262efa49ef073b": Get "https://[172.16.0.1]:443/api/v1/namespaces/default": dial tcp 172.16.0.1:443: i/o timeout

# 解决方案
vim /etc/cni/net.d/calico-kubeconfig
server: https://192.168.0.250:6443


七、 故障描述

kube-proxy问题
E1009 15:43:30.994633 32520 conntrack.go:115] failed to list mount points: wrong number of fields (expected 6, got 7)

解决方案
umount /data/k8s/kubelet /pods/f4e4118b-397e-4848-9b9c-5a3e5b54273e/volumes/kubernetes.io~secret/calico-node-token-zvwhb
umount /data/k8s/kubelet /pods/f4e4118b-397e-4848-9b9c-5a3e5b54273e/volumes/kubernetes.io~secret/etcd-certs

rm -fr /data/k8s/kubelet /pods/*

systemctl restart containerd
systemctl restart kubelet
systemctl restart kube-proxy

 

标签:k8s,https,二进制,192.168,failed,io,K8S,calico,搭建
From: https://www.cnblogs.com/yxy-linux/p/16806156.html

相关文章

  • K8S statefulset
       StatefulSet详解kubectlexplainsts.spec:主要字段解释replicas:副本数selector:那个pod是由自己管理的serviceName:必须关联到一个无头服务商template:定义pod模......
  • python+selenium环境搭建
    1、首先命令行进入到python安装目录的scripts目录下2、使用pip3installselenium,由于我是安装过的,所以会提示这个3、将谷歌浏览器的driver放到python安装目录下4、代码验证......
  • Limit讨论,K8s 使用 CPU Limit 后,服务响应变成龟速...
    你应当小心设定k8s中负载的CPUlimit,太小的值会给你的程序带来额外的、无意义的延迟,太大的值会带来过大的爆炸半径,削弱集群的整体稳定性。 1.request和limitk8s的......
  • K8S 故障排错新手段:kubectl debug 实战
    K8SINTERNAL系列容器编排之争在Kubernetes一统天下局面形成后,K8S成为了云原生时代的新一代操作系统。K8S让一切变得简单了,但自身逐渐变得越来越复杂。【K8SInternals......
  • K8S 拉取阿里云镜像
    DockerImage 推到阿里云仓库,可以看 SpringBootDocker发布到阿里仓库 1.阿里镜像仓库加了授权,所以K8S 拉之前要做下授权处理[root@k8smaster~]#kubectlcre......
  • 二进制查看器 Binary Viewer
     BinaryViewer是一款专业的二进制查看器,它能显示数据以十进制,八进制,十六进制和文本(ASCII码或统一的字符编码标准)的格式。能查看任何文件的二进制代码,支持直接编辑文件的......
  • 深入剖析Redis系列: Redis集群模式搭建与原理详解
    前言在Redis3.0之前,使用 哨兵(sentinel)机制来监控各个节点之间的状态。RedisCluster是Redis的 分布式解决方案,在3.0版本正式推出,有效地解决了Redis在 分布式 ......
  • 如何快速搭建k8s的kubemark性能测试环境
    Kubemark学习文档搭建k8s集群......
  • K8S入门篇-配置管理
    一、ConfigMap1.1ConfigMap介绍ConfigMap是一种API对象,用来将非机密性的数据保存到键值对中。使用时, Pods 可以将其用作环境变量、命令行参数或者存储卷中的配置文......
  • DSC集群搭建
    一、集群介绍  DMDSC集群是一个多实例、单数据库的系统。多个数据库实例可以同时访问、修改同一个数据库的数据。用户可以登录集群中的任意一个数据库实例,获得完整的数......