node-3工作节点上Failed connect to 127.0.0.1:6443; 拒绝连接
来源:5-6 部署kubernetes工作节点

香泪
2021-05-29
[root@node-3 ~]# crictl images
IMAGE TAG IMAGE ID SIZE
docker.io/library/nginx 1.19 f0b8a9a541369 53.7MB
[root@node-3 ~]# crictl ps
CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID
[root@node-3 ~]# curl 127.0.0.1:6443
curl: (7) Failed connect to 127.0.0.1:6443; 拒绝连接
[root@node-3 ~]#
journalctl -f -u kube-proxy 执行这个还是报拒绝访问,请问老师怎么解决
[root@node-3 kubernetes]# ls
kubeconfig kubelet-config.yaml kube-proxy-config.yaml kube-proxy.kubeconfig manifests ssl
[root@node-3 kubernetes]# cat kubelet-config.yaml
kind: KubeletConfiguration
apiVersion: kubelet.config.k8s.io/v1beta1
authentication:
anonymous:
enabled: false
webhook:
enabled: true
x509:
clientCAFile: "/etc/kubernetes/ssl/ca.pem"
authorization:
mode: Webhook
clusterDomain: "cluster.local"
clusterDNS:
- "169.254.25.10"
podCIDR: "10.200.0.0/16"
address: 192.168.87.224
readOnlyPort: 0
staticPodPath: /etc/kubernetes/manifests
healthzPort: 10248
healthzBindAddress: 127.0.0.1
kubeletCgroups: /systemd/system.slice
resolvConf: "/etc/resolv.conf"
runtimeRequestTimeout: "15m"
kubeReserved:
cpu: 200m
memory: 512M
tlsCertFile: "/etc/kubernetes/ssl/node-3.pem"
tlsPrivateKeyFile: “/etc/kubernetes/ssl/node-3-key.pem”
[root@node-3 kubernetes]# cd manifests/
[root@node-3 manifests]# ls
nginx-proxy.yaml
[root@node-3 manifests]#
[root@node-3 ~]# systemctl status kubelet
● kubelet.service - Kubernetes Kubelet
Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; vendor preset: disabled)
Active: active (running) since 四 2021-06-03 21:49:03 CST; 4s ago
Docs: https://github.com/kubernetes/kubernetes
Main PID: 1555 (kubelet)
Tasks: 7
Memory: 21.8M
CGroup: /system.slice/kubelet.service
└─1555 /usr/local/bin/kubelet --config=/etc/kubernetes/kubelet-config.yaml --container-runtime=remote --container-runtime-endpoint=unix:///var/run/containerd/containerd.sock…
6月 03 21:49:03 node-3 kubelet[1555]: I0603 21:49:03.496727 1555 feature_gate.go:243] feature gates: &{map[]}
6月 03 21:49:03 node-3 kubelet[1555]: I0603 21:49:03.500400 1555 feature_gate.go:243] feature gates: &{map[]}
6月 03 21:49:03 node-3 kubelet[1555]: I0603 21:49:03.500514 1555 feature_gate.go:243] feature gates: &{map[]}
6月 03 21:49:03 node-3 kubelet[1555]: I0603 21:49:03.512894 1555 mount_linux.go:202] Detected OS with systemd
6月 03 21:49:03 node-3 kubelet[1555]: I0603 21:49:03.513537 1555 server.go:416] Version: v1.20.2
6月 03 21:49:03 node-3 kubelet[1555]: I0603 21:49:03.513670 1555 feature_gate.go:243] feature gates: &{map[]}
6月 03 21:49:03 node-3 kubelet[1555]: I0603 21:49:03.513805 1555 feature_gate.go:243] feature gates: &{map[]}
6月 03 21:49:03 node-3 kubelet[1555]: I0603 21:49:03.561890 1555 dynamic_cafile_content.go:129] Loaded a new CA Bundle and Verifier for "client-ca-bundle::/etc/kubernetes/ssl/ca.pem"
6月 03 21:49:03 node-3 kubelet[1555]: I0603 21:49:03.562260 1555 manager.go:165] cAdvisor running in container: "/sys/fs/cgroup/cpu,cpuacct/system.slice/kubelet.service"
6月 03 21:49:03 node-3 kubelet[1555]: I0603 21:49:03.562768 1555 dynamic_cafile_content.go:167] Starting client-ca-bundle::/etc/kubernetes/ssl/ca.pem
Hint: Some lines were ellipsized, use -l to show in full.
[root@node-3 ~]# crictl ps
CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID
[root@node-3 ~]#
5回答
-
Mr_Lee_Bin
2022-08-11
我的解决方案: #先下载 ctr pull registry.cn-hangzhou.aliyuncs.com/imooc2/redis:alpine #再测试 ctr run -t -d registry.cn-hangzhou.aliyuncs.com/imooc2/redis:alpine redis 跑不起来, #卸载rpm -e libseccomp-devel-2.3.1-4.el7.x86_64 --nodeps,rpm -e libseccomp-2.3.1-4.el7.x86_64 --nodeps #下载高于2.4以上的包wget http://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/libseccomp-2.5.1-1.el8.x86_64.rpm #安装rpm -ivh libseccomp-2.5.1-1.el8.x86_64.rpm再run,OK! #回看node3 journalctl -f -u kubelet 和journalctl -f -u kube-proxy好了。
10 -
小小太阳秦
2022-05-11
nginx 容器没有启动 这个原因找到了吗?
00 -
水瓶呀
2021-12-13
和您遇到一样的问题,请问怎么解决的?我重启kubelet和kube-proxy也不行
00 -
慕函数2082699
2021-09-20
这个问题有结论吗?我遇到了相同的问题
012021-10-06 -
刘果国
2021-05-30
帮你整理一下思路:6443是哪个组件的端口?这个组件运行在哪个节点?这个组件是否正常?kube-proxy为什么去连接127.0.0.1的6443?在哪里可以配置这个地址?
0122021-11-08
相似问题