问题遇到的现象和发生背景
树莓派arm64版本用kubeadm方式部署k8s,一切正常,不过查看etcd的时候,发现错误:
有错误503:
###### 问题相关代码,请勿粘贴截图
```bash
[root@k8smaster ~]# kubectl describe pods etcd-k8smaster -n kube-system
###### 运行结果及报错内容
```bash
Name: etcd-k8smaster
Namespace: kube-system
Priority: 2000000000
Priority Class Name: system-cluster-critical
Node: k8smaster/192.168.0.200
Start Time: Fri, 05 Aug 2022 14:19:59 +0800
Labels: component=etcd
tier=control-plane
Annotations: kubeadm.kubernetes.io/etcd.advertise-client-urls: https://192.168.0.200:2379
kubernetes.io/config.hash: 20226498f18eda5486f418f7d909e916
kubernetes.io/config.mirror: 20226498f18eda5486f418f7d909e916
kubernetes.io/config.seen: 2022-07-28T17:58:49.915164955+08:00
kubernetes.io/config.source: file
Status: Running
IP: 192.168.0.200
IPs:
IP: 192.168.0.200
Controlled By: Node/k8smaster
Containers:
etcd:
Container ID: docker://b013638179154125b2fa23a54dd4a923f8c37a2adcbc4e4acc93101b6222e148
Image: registry.aliyuncs.com/google_containers/etcd:3.4.3-0
Image ID: docker-pullable://registry.aliyuncs.com/google_containers/etcd@sha256:4afb99b4690b418ffc2ceb67e1a17376457e441c1f09ab55447f0aaf992fa646
Port: <none>
Host Port: <none>
Command:
etcd
--advertise-client-urls=https://192.168.0.200:2379
--cert-file=/etc/kubernetes/pki/etcd/server.crt
--client-cert-auth=true
--data-dir=/var/lib/etcd
--initial-advertise-peer-urls=https://192.168.0.200:2380
--initial-cluster=k8smaster=https://192.168.0.200:2380
--key-file=/etc/kubernetes/pki/etcd/server.key
--listen-client-urls=https://127.0.0.1:2379,https://192.168.0.200:2379
--listen-metrics-urls=http://127.0.0.1:2381
--listen-peer-urls=https://192.168.0.200:2380
--name=k8smaster
--peer-cert-file=/etc/kubernetes/pki/etcd/peer.crt
--peer-client-cert-auth=true
--peer-key-file=/etc/kubernetes/pki/etcd/peer.key
--peer-trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
--snapshot-count=10000
--trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
State: Running
Started: Fri, 05 Aug 2022 14:20:04 +0800
Last State: Terminated
Reason: Completed
Exit Code: 0
Started: Thu, 04 Aug 2022 10:12:17 +0800
Finished: Fri, 05 Aug 2022 14:19:02 +0800
Ready: True
Restart Count: 18
Liveness: http-get http://127.0.0.1:2381/health delay=15s timeout=15s period=10s #success=1 #failure=8
Environment: <none>
Mounts:
/etc/kubernetes/pki/etcd from etcd-certs (rw)
/var/lib/etcd from etcd-data (rw)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
etcd-certs:
Type: HostPath (bare host directory volume)
Path: /etc/kubernetes/pki/etcd
HostPathType: DirectoryOrCreate
etcd-data:
Type: HostPath (bare host directory volume)
Path: /var/lib/etcd
HostPathType: DirectoryOrCreate
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: :NoExecute
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning Unhealthy 53s (x46 over 3h55m) kubelet, k8smaster Liveness probe failed: HTTP probe failed with statuscode: 503
错误:
###### 我的解答思路和尝试过的方法
[root@k8smaster ~]# kubectl get all -o wide
```bash
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 8d <none>
我想要达到的结果
etcd 探测可以显示正常