全新 Ubuntu 18.04 系统想部署all in one,在执行./kk create cluster –with-kubernetes v1.17.9 –with-kubesphere v3.0.0命令时报错,请参考下方报错信息,反复尝试均报错,换其他全新机器也报同样的错误,请帮忙,谢谢

INFO[11:16:36 CST] Initializing kubernetes cluster
[ubuntu 10.0.23.34] MSG:
[preflight] Running pre-flight checks
W0928 11:16:38.437536 4101 removeetcdmember.go:79] [reset] No kubeadm config, using etcd pod spec to get data directory
[reset] No etcd config found. Assuming external etcd
[reset] Please, manually reset etcd to prevent further issues
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in “/var/lib/kubelet”
W0928 11:16:38.444479 4101 cleanupnode.go:99] [reset] Failed to evaluate the “/var/lib/kubelet” directory. Skipping its unmount and cleanup: lstat /var/lib/kubelet: no such file or directory
[reset] Deleting contents of config directories: [/etc/kubernetes/manifests /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]
[reset] Deleting contents of stateful directories: [/var/lib/dockershim /var/run/kubernetes /var/lib/cni]

The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d

The reset process does not reset or clean up iptables rules or IPVS tables.
If you wish to reset iptables, you must do so manually by using the “iptables” command.

If your cluster was setup to utilize IPVS, run ipvsadm –clear (or similar)
to reset your system’s IPVS tables.

The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
[ubuntu 10.0.23.34] MSG:
[preflight] Running pre-flight checks
W0928 11:16:38.973844 4171 removeetcdmember.go:79] [reset] No kubeadm config, using etcd pod spec to get data directory
[reset] No etcd config found. Assuming external etcd
[reset] Please, manually reset etcd to prevent further issues
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in “/var/lib/kubelet”
W0928 11:16:38.983655 4171 cleanupnode.go:99] [reset] Failed to evaluate the “/var/lib/kubelet” directory. Skipping its unmount and cleanup: lstat /var/lib/kubelet: no such file or directory
[reset] Deleting contents of config directories: [/etc/kubernetes/manifests /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]
[reset] Deleting contents of stateful directories: [/var/lib/dockershim /var/run/kubernetes /var/lib/cni]

The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d

The reset process does not reset or clean up iptables rules or IPVS tables.
If you wish to reset iptables, you must do so manually by using the “iptables” command.

If your cluster was setup to utilize IPVS, run ipvsadm –clear (or similar)
to reset your system’s IPVS tables.

The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
ERRO[11:16:39 CST] Failed to init kubernetes cluster: Failed to exec command: sudo -E /bin/sh -c “/usr/local/bin/kubeadm init –config=/etc/kubernetes/kubeadm-config.yaml”
W0928 11:16:39.109126 4185 defaults.go:186] The recommended value for “clusterDNS” in “KubeletConfiguration” is: [10.233.0.10]; the provided value is: [169.254.25.10]
W0928 11:16:39.109907 4185 validation.go:28] Cannot validate kube-proxy config - no validator is available
W0928 11:16:39.110175 4185 validation.go:28] Cannot validate kubelet config - no validator is available
[init] Using Kubernetes version: v1.17.9
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected “cgroupfs” as the Docker cgroup driver. The recommended driver is “systemd”. Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING FileExisting-socat]: socat not found in system path
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
To see the stack trace of this error execute with –v=5 or higher: Process exited with status 1 node=10.0.23.34
WARN[11:16:39 CST] Task failed …
WARN[11:16:39 CST] error: interrupted by error
Error: Failed to init kubernetes cluster: interrupted by error

    1 个月 后

    我也遇到这么问题了,您解决了么?

    9 天 后

    IcyG [ERROR NumCPU]: the number of available CPUs 1 is less than the required 2
    你机器只有一个CPU?仔细看一下前提条件

      rayzhou2017 ERRO[20:41:06 CST] Failed to init kubernetes cluster: Failed to exec command: sudo -E /bin/sh -c “/usr/local/bin/kubeadm init –config=/etc/kubernetes/kubeadm-config.yaml”
      W1118 20:41:01.073035 893 utils.go:26] The recommended value for “clusterDNS” in “KubeletConfiguration” is: [169.254.0.10]; the provided value is: [169.254.25.10]
      W1118 20:41:01.073281 893 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
      [init] Using Kubernetes version: v1.18.6
      [preflight] Running pre-flight checks
      [WARNING FileExisting-socat]: socat not found in system path
      error execution phase preflight: [preflight] Some fatal errors occurred:
      [ERROR FileExisting-conntrack]: conntrack not found in system path
      [preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
      To see the stack trace of this error execute with –v=5 or higher: Process exited with status 1 node=192.168.100.228
      WARN[20:41:06 CST] Task failed …
      WARN[20:41:06 CST] error: interrupted by error
      Error: Failed to init kubernetes cluster: interrupted by error
      Usage:
      kk create cluster [flags]

      Flags:
      -f, –filename string Path to a configuration file
      -h, –help help for cluster
      –skip-pull-images Skip pre pull images
      –with-kubernetes string Specify a supported version of kubernetes
      –with-kubesphere Deploy a specific version of kubesphere (default v3.0.0)
      -y, –yes Skip pre-check of the installation

      Global Flags:
      –debug Print detailed information (default true)

      Failed to init kubernetes cluster: interrupted by error

      麻烦帮看看乍回事

        spacestime init] Using Kubernetes version: v1.18.6
        [preflight] Running pre-flight checks
        [WARNING FileExisting-socat]: socat not found in system path
        error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR FileExisting-conntrack]: conntrack not found in system path

        这不是很清楚吗,缺socat和conntrack,仔细看文档前提条件