kubeadm init - ConfigMap을 생성할 수 없음

kubeadm init - ConfigMap을 생성할 수 없음

언제설치Ubuntu의 스택형 HA 클러스터:

LOAD_BALANCER_DNS_LOAD_BALANCER_PORT=192.170.1.165:6443

sudo kubeadm init --v=9 --control-plane-endpoint "$LOAD_BALANCER_DNS_LOAD_BALANCER_PORT" --upload-certs

nc -v 192.170.1.165 6443
Connection to 192.170.1.165 6443 port [tcp/*] succeeded!

다음과 같은 오류가 발생했습니다.unable to create ConfigMap

66cbe" 'https://192.170.1.165:6443/api/v1/namespaces/kube-system/configmaps?timeout=10s'
I0825 14:27:59.589709   59043 round_trippers.go:510] HTTP Trace: Dial to tcp:192.170.1.165:6443 succeed
I0825 14:27:59.590522   59043 round_trippers.go:553] POST https://192.170.1.165:6443/api/v1/namespaces/kube-system/configmaps?timeout=10s  in 1 milliseconds
I0825 14:27:59.590539   59043 round_trippers.go:570] HTTP Statistics: DNSLookup 0 ms Dial 0 ms TLSHandshake 0 ms Duration 1 ms
I0825 14:27:59.590542   59043 round_trippers.go:577] Response Headers:
Post "https://192.170.1.165:6443/api/v1/namespaces/kube-system/configmaps?timeout=10s": read tcp 192.170.1.166:43306->192.170.1.165:6443: read: connection reset by peer
unable to create ConfigMap
k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient.CreateOrUpdateConfigMap
    cmd/kubeadm/app/util/apiclient/idempotency.go:48
k8s.io/kubernetes/cmd/kubeadm/app/phases/addons/proxy.createKubeProxyConfigMap
    cmd/kubeadm/app/phases/addons/proxy/proxy.go:239
k8s.io/kubernetes/cmd/kubeadm/app/phases/addons/proxy.EnsureProxyAddon
    cmd/kubeadm/app/phases/addons/proxy/proxy.go:53
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/init.runKubeProxyAddon
    cmd/kubeadm/app/cmd/phases/init/addons.go:121
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run.func1
    cmd/kubeadm/app/cmd/phases/workflow/runner.go:234
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).visitAll
    cmd/kubeadm/app/cmd/phases/workflow/runner.go:421
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run
    cmd/kubeadm/app/cmd/phases/workflow/runner.go:207
k8s.io/kubernetes/cmd/kubeadm/app/cmd.newCmdInit.func1
    cmd/kubeadm/app/cmd/init.go:154
github.com/spf13/cobra.(*Command).execute
    vendor/github.com/spf13/cobra/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
    vendor/github.com/spf13/cobra/command.go:974
github.com/spf13/cobra.(*Command).Execute
    vendor/github.com/spf13/cobra/command.go:902
k8s.io/kubernetes/cmd/kubeadm/app.Run
    cmd/kubeadm/app/kubeadm.go:50
main.main
    cmd/kubeadm/kubeadm.go:25
runtime.main
    /usr/local/go/src/runtime/proc.go:250
runtime.goexit
    /usr/local/go/src/runtime/asm_arm64.s:1165
error execution phase addon/kube-proxy
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run.func1
    cmd/kubeadm/app/cmd/phases/workflow/runner.go:235
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).visitAll
    cmd/kubeadm/app/cmd/phases/workflow/runner.go:421
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run
    cmd/kubeadm/app/cmd/phases/workflow/runner.go:207
k8s.io/kubernetes/cmd/kubeadm/app/cmd.newCmdInit.func1
    cmd/kubeadm/app/cmd/init.go:154
github.com/spf13/cobra.(*Command).execute
    vendor/github.com/spf13/cobra/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
    vendor/github.com/spf13/cobra/command.go:974
github.com/spf13/cobra.(*Command).Execute
    vendor/github.com/spf13/cobra/command.go:902
k8s.io/kubernetes/cmd/kubeadm/app.Run
    cmd/kubeadm/app/kubeadm.go:50
main.main
    cmd/kubeadm/kubeadm.go:25
runtime.main
    /usr/local/go/src/runtime/proc.go:250
runtime.goexit
    /usr/local/go/src/runtime/asm_arm64.s:1165

crictl 포드:

POD ID              CREATED              STATE               NAME                               NAMESPACE           ATTEMPT             RUNTIME
435ef9c64a2d9       4 seconds ago        Ready               etcd-master01                      kube-system         5                   (default)
5b5b6e45a448d       53 seconds ago       NotReady            etcd-master01                      kube-system         4                   (default)
7483720dac151       About a minute ago   Ready               kube-controller-manager-master01   kube-system         2                   (default)
62153c56874f4       3 minutes ago        Ready               kube-apiserver-master01            kube-system         2                   (default)
36f1ba22747c4       4 minutes ago        NotReady            etcd-master01                      kube-system         3                   (default)
1350a2a2b7988       7 minutes ago        NotReady            kube-apiserver-master01            kube-system         1                   (default)
3c0219bab3475       8 minutes ago        Ready               kube-scheduler-master01            kube-system         1                   (default)



Environment:


kubectl version
kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-08-23T17:44:59Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/arm64"}
Kustomize Version: v4.5.7
error: Get "https://192.170.1.165:6443/version?timeout=32s": read tcp 192.170.1.166:44872->192.170.1.165:6443: read: connection reset by peer - error from a previous attempt: read tcp 192.170.1.166:44848->192.170.1.165:6443: read: connection reset by peer


Ubuntu
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

uname -a
Linux master01 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:08:11 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

containerD

답변1

/etc/containerd/config.toml다음으로 업데이트하세요 .

version = 2
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
  runtime_type = "io.containerd.runc.v2"
  [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
    SystemdCgroup = true

관련 정보