Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

questions about installation on centos7 #2165

Open
pkyit opened this issue Mar 10, 2024 · 4 comments
Open

questions about installation on centos7 #2165

pkyit opened this issue Mar 10, 2024 · 4 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@pkyit
Copy link

pkyit commented Mar 10, 2024

Your current KubeKey version

No response

Describe this feature

集群搭建报这个错误

Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.

    Unfortunately, an error has occurred:
            timed out waiting for the condition

    This error is likely caused by:
            - The kubelet is not running
            - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

    If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
            - 'systemctl status kubelet'
            - 'journalctl -xeu kubelet'

    Additionally, a control plane component may have crashed or exited when started by the container runtime.
    To troubleshoot, list all containers using your preferred container runtimes CLI.

    Here is one example how you may list all Kubernetes containers running in docker:
            - 'docker ps -a | grep kube | grep -v pause'
            Once you have found the failing container, you can inspect its logs with:
            - 'docker logs CONTAINERID'

error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher: Process exited with status 1

Describe the solution you'd like

Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.

    Unfortunately, an error has occurred:
            timed out waiting for the condition

    This error is likely caused by:
            - The kubelet is not running
            - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

    If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
            - 'systemctl status kubelet'
            - 'journalctl -xeu kubelet'

    Additionally, a control plane component may have crashed or exited when started by the container runtime.
    To troubleshoot, list all containers using your preferred container runtimes CLI.

    Here is one example how you may list all Kubernetes containers running in docker:
            - 'docker ps -a | grep kube | grep -v pause'
            Once you have found the failing container, you can inspect its logs with:
            - 'docker logs CONTAINERID'

error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher: Process exited with status 1

Additional information

No response

@zorn-zhao
Copy link

我centos7能安装成功。
以下是参考模板:

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
  name: sample
spec:
  hosts:
  - {name: master, address: 192.168.248.128, internalAddress: 192.168.248.128, user: root, password: "123456"}
  - {name: node1, address: 192.168.248.129, internalAddress: 192.168.248.129, user: root, password: "123456"}
  roleGroups:
    etcd:
    - master
    control-plane: 
    - master
    worker:
    - node1
  controlPlaneEndpoint:
    ## Internal loadbalancer for apiservers 
    internalLoadbalancer: haproxy

    domain: lb.kubesphere.local
    address: ""
    port: 6443
  kubernetes:
    version: v1.21.14
    clusterName: cluster.local
    autoRenewCerts: true
    containerManager: docker
  etcd:
    type: kubekey
  network:
    plugin: calico
    kubePodsCIDR: 10.233.64.0/18
    kubeServiceCIDR: 10.233.0.0/18
    ## multus support. https://github.com/k8snetworkplumbingwg/multus-cni
    multusCNI:
      enabled: false
  registry:
    privateRegistry: ""
    namespaceOverride: ""
    registryMirrors: []
    insecureRegistries: []
  addons: []

@calvinyv calvinyv changed the title centos7 questions about installation on centos7 Mar 20, 2024
@calvinyv calvinyv added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Mar 20, 2024
@zmoon460
Copy link

3.1.0r1 offline install one node k8s 1.28.6 ,

40s timeout

two bug :

1: /var/lib/kubelet/kubeadm-flags.env
--cgroup-driver=cgroupfs

change to
--cgroup-driver=systemd

2: etcd service fail

/etc/etcd.env

ETCD_INITIAL_CLUSTER_STATE=existing
change to
ETCD_INITIAL_CLUSTER_STATE=new

systemctl restart etcd

也许存在关联性,修复后仍无法成功最终安装,但 online install 正常

@pixiake
Copy link
Collaborator

pixiake commented Mar 26, 2024

40s timeout

If etcd fails to start, you can use jounnalctl -f -u etcd to check the etcd logs.

@pixiake
Copy link
Collaborator

pixiake commented Mar 26, 2024

Initial timeout means that the kube-apiserver did not start properly or cannot establish a connection to the kube-apiserver.

You can use docker ps to check the running status of kube-apiserver, or use curl -k https://masterIP:6443 to check the network connectivity of kube-apiserver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

5 participants