[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:
[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 ~]#