在 Ubuntu 2004 跑,IP: 172.31.64.157 ,按照教程跑
root@ubuntu:~# kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.1", GitCommit:"8f94681cd294aa8cfd3407b8191f6c70214973a4", GitTreeState:"clean", BuildDate:"2023-01-18T15:56:50Z", GoVersion:"go1.19.5", Compiler:"gc", Platform:"linux/amd64"}
kubeadm init --pod-network-cidr=10.244.0.0/16 --cri-socket=unix:/run/containerd/containerd.sock --image-repository=registry.aliyuncs.com/google_containers --apiserver-advertise-address=172.31.64.157 --v=5
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
I0302 10:41:01.843554 26058 manifests.go:99] [control-plane] getting StaticPodSpecs
I0302 10:41:01.843797 26058 certs.go:519] validating certificate period for CA certificate
I0302 10:41:01.843883 26058 manifests.go:125] [control-plane] adding volume "ca-certs" for component "kube-apiserver"
I0302 10:41:01.843892 26058 manifests.go:125] [control-plane] adding volume "etc-ca-certificates" for component "kube-apiserver"
I0302 10:41:01.843899 26058 manifests.go:125] [control-plane] adding volume "etc-pki" for component "kube-apiserver"
I0302 10:41:01.843905 26058 manifests.go:125] [control-plane] adding volume "k8s-certs" for component "kube-apiserver"
I0302 10:41:01.843912 26058 manifests.go:125] [control-plane] adding volume "usr-local-share-ca-certificates" for component "kube-apiserver"
I0302 10:41:01.843918 26058 manifests.go:125] [control-plane] adding volume "usr-share-ca-certificates" for component "kube-apiserver"
I0302 10:41:01.846863 26058 manifests.go:154] [control-plane] wrote static Pod manifest for component "kube-apiserver" to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
I0302 10:41:01.846894 26058 manifests.go:99] [control-plane] getting StaticPodSpecs
I0302 10:41:01.847150 26058 manifests.go:125] [control-plane] adding volume "ca-certs" for component "kube-controller-manager"
I0302 10:41:01.847167 26058 manifests.go:125] [control-plane] adding volume "etc-ca-certificates" for component "kube-controller-manager"
I0302 10:41:01.847189 26058 manifests.go:125] [control-plane] adding volume "etc-pki" for component "kube-controller-manager"
I0302 10:41:01.847216 26058 manifests.go:125] [control-plane] adding volume "flexvolume-dir" for component "kube-controller-manager"
I0302 10:41:01.847235 26058 manifests.go:125] [control-plane] adding volume "k8s-certs" for component "kube-controller-manager"
I0302 10:41:01.847247 26058 manifests.go:125] [control-plane] adding volume "kubeconfig" for component "kube-controller-manager"
I0302 10:41:01.847258 26058 manifests.go:125] [control-plane] adding volume "usr-local-share-ca-certificates" for component "kube-controller-manager"
I0302 10:41:01.847270 26058 manifests.go:125] [control-plane] adding volume "usr-share-ca-certificates" for component "kube-controller-manager"
I0302 10:41:01.848363 26058 manifests.go:154] [control-plane] wrote static Pod manifest for component "kube-controller-manager" to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[control-plane] Creating static Pod manifest for "kube-scheduler"
I0302 10:41:01.851515 26058 manifests.go:99] [control-plane] getting StaticPodSpecs
I0302 10:41:01.851928 26058 manifests.go:125] [control-plane] adding volume "kubeconfig" for component "kube-scheduler"
I0302 10:41:01.854200 26058 manifests.go:154] [control-plane] wrote static Pod manifest for component "kube-scheduler" to "/etc/kubernetes/manifests/kube-scheduler.yaml"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
I0302 10:41:01.854985 26058 local.go:65] [etcd] wrote Static Pod manifest for a local etcd member to "/etc/kubernetes/manifests/etcd.yaml"
I0302 10:41:01.855019 26058 waitcontrolplane.go:83] [wait-control-plane] Waiting for the API server to be healthy
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
I0302 10:41:02.858910 26058 with_retry.go:234] Got a Retry-After 1s response for attempt 1 to https://172.31.64.157:6443/healthz?timeout=10s
I0302 10:41:03.859894 26058 with_retry.go:234] Got a Retry-After 1s response for attempt 2 to https://172.31.64.157:6443/healthz?timeout=10s
I0302 10:41:04.861700 26058 with_retry.go:234] Got a Retry-After 1s response for attempt 3 to https://172.31.64.157:6443/healthz?timeout=10s
I0302 10:41:05.862985 26058 with_retry.go:234] Got a Retry-After 1s response for attempt 4 to https://172.31.64.157:6443/healthz?timeout=10s
I0302 10:41:06.864531 26058 with_retry.go:234] Got a Retry-After 1s response for attempt 5 to https://172.31.64.157:6443/healthz?timeout=10s
kubelet 服务状态
root@ubuntu:~# systemctl status kubelet
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: active (running) since Thu 2023-03-02 10:41:01 UTC; 4min 43s ago
Docs: https://kubernetes.io/docs/home/
Main PID: 26191 (kubelet)
Tasks: 14 (limit: 19066)
Memory: 29.1M
CPU: 2.794s
CGroup: /system.slice/kubelet.service
└─26191 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --container-runtime-endpoin>
Mar 02 10:45:45 ubuntu kubelet[26191]: E0302 10:45:45.207948 26191 kubelet.go:2448] "Error getting node" err="node \"ubuntu\" not found"
Mar 02 10:45:45 ubuntu kubelet[26191]: E0302 10:45:45.308259 26191 kubelet.go:2448] "Error getting node" err="node \"ubuntu\" not found"
Mar 02 10:45:45 ubuntu kubelet[26191]: E0302 10:45:45.380894 26191 remote_runtime.go:222] "RunPodSandbox from runtime service failed" err="rpc error: code = DeadlineExceeded desc = failed to get sandbox im>
Mar 02 10:45:45 ubuntu kubelet[26191]: E0302 10:45:45.380958 26191 kuberuntime_sandbox.go:71] "Failed to create sandbox for pod" err="rpc error: code = DeadlineExceeded desc = failed to get sandbox image \>
Mar 02 10:45:45 ubuntu kubelet[26191]: E0302 10:45:45.380987 26191 kuberuntime_manager.go:772] "CreatePodSandbox for pod failed" err="rpc error: code = DeadlineExceeded desc = failed to get sandbox image \>
Mar 02 10:45:45 ubuntu kubelet[26191]: E0302 10:45:45.381042 26191 pod_workers.go:965] "Error syncing pod, skipping" err="failed to \"CreatePodSandbox\" for \"kube-controller-manager-ubuntu_kube-system(f7c>
Mar 02 10:45:45 ubuntu kubelet[26191]: E0302 10:45:45.409374 26191 kubelet.go:2448] "Error getting node" err="node \"ubuntu\" not found"
Mar 02 10:45:45 ubuntu kubelet[26191]: E0302 10:45:45.510227 26191 kubelet.go:2448] "Error getting node" err="node \"ubuntu\" not found"
Mar 02 10:45:45 ubuntu kubelet[26191]: E0302 10:45:45.611099 26191 kubelet.go:2448] "Error getting node" err="node \"ubuntu\" not found"
Mar 02 10:45:45 ubuntu kubelet[26191]: E0302 10:45:45.711709 26191 kubelet.go:2448] "Error getting node" err="node \"ubuntu\" not found"
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.