Coder Social home page Coder Social logo

Comments (7)

xy2019devl avatar xy2019devl commented on May 27, 2024

[root@localhost ~]# ping www.bing.com
PING china.bing123.com (202.89.233.101) 56(84) bytes of data.
64 bytes from 202.89.233.101 (202.89.233.101): icmp_seq=1 ttl=117 time=11.2 ms
64 bytes from 202.89.233.101 (202.89.233.101): icmp_seq=2 ttl=117 time=8.08 ms
64 bytes from 202.89.233.101 (202.89.233.101): icmp_seq=3 ttl=117 time=5.61 ms
^C
--- china.bing123.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 5.611/8.288/11.177/2.279 ms
[root@localhost ~]# bash kainstall-centos.sh init --master 192.168.3.168 --worker 192.168.3.169,192.168.3.170 --user root --password 1qaz2wsx --port 22 --version 1.25.2 --10years
[2022-10-12T18:49:53.058925213+0800]: INFO: [start] bash kainstall-centos.sh init --master 192.168.3.168 --worker 192.168.3.169,192.168.3.170 --user root --password zzzzzz --port 22 --version 1.25.2 --10years
[2022-10-12T18:49:53.062391266+0800]: INFO: [check] ssh command exists.
[2022-10-12T18:49:53.063458198+0800]: INFO: [check] sshpass command exists.
[2022-10-12T18:49:53.064654453+0800]: INFO: [check] wget command exists.
[2022-10-12T18:49:53.383277313+0800]: INFO: [check] ssh 192.168.3.168 connection succeeded.
[2022-10-12T18:49:53.568032905+0800]: INFO: [check] ssh 192.168.3.169 connection succeeded.
[2022-10-12T18:49:53.750972807+0800]: INFO: [check] ssh 192.168.3.170 connection succeeded.
[2022-10-12T18:49:53.752574054+0800]: INFO: [check] os support: centos7 centos8
[2022-10-12T18:49:53.933207721+0800]: INFO: [check] 192.168.3.168 os support succeeded.
[2022-10-12T18:49:54.223950095+0800]: INFO: [check] 192.168.3.169 os support succeeded.
[2022-10-12T18:49:54.519459950+0800]: INFO: [check] 192.168.3.170 os support succeeded.
[2022-10-12T18:49:54.523046112+0800]: INFO: [init] Get 192.168.3.168 InternalIP.
[2022-10-12T18:49:54.700911957+0800]: INFO: [command] get MGMT_NODE_IP value succeeded.
[2022-10-12T18:49:54.703735051+0800]: INFO: [init] master: 192.168.3.168
[2022-10-12T18:50:02.030265540+0800]: INFO: [init] init master 192.168.3.168 succeeded.
[2022-10-12T18:50:02.325794662+0800]: INFO: [init] 192.168.3.168 set hostname and hostname resolution succeeded.
[2022-10-12T18:50:02.331177461+0800]: INFO: [init] 192.168.3.168: set audit-policy file.
[2022-10-12T18:50:02.514122380+0800]: INFO: [init] 192.168.3.168: set audit-policy file succeeded.
[2022-10-12T18:50:02.518988570+0800]: INFO: [init] worker: 192.168.3.169
[2022-10-12T18:50:10.418716046+0800]: INFO: [init] init worker 192.168.3.169 succeeded.
[2022-10-12T18:50:10.744351569+0800]: INFO: [init] worker: 192.168.3.170
[2022-10-12T18:50:18.981640600+0800]: INFO: [init] init worker 192.168.3.170 succeeded.
[2022-10-12T18:50:19.364004954+0800]: INFO: [install] install docker on 192.168.3.168.
[2022-10-12T18:50:20.767876909+0800]: ERROR: [install] install docker on 192.168.3.168 failed.
[2022-10-12T18:50:20.769871727+0800]: INFO: [install] install kube on 192.168.3.168
[2022-10-12T18:50:23.896461546+0800]: ERROR: [install] install kube on 192.168.3.168 failed.
[2022-10-12T18:50:23.902302657+0800]: INFO: [install] install docker on 192.168.3.169.
[2022-10-12T18:50:26.176693401+0800]: ERROR: [install] install docker on 192.168.3.169 failed.
[2022-10-12T18:50:26.178732381+0800]: INFO: [install] install kube on 192.168.3.169
[2022-10-12T18:50:32.782616538+0800]: ERROR: [install] install kube on 192.168.3.169 failed.
[2022-10-12T18:50:32.785061910+0800]: INFO: [install] install docker on 192.168.3.170.
[2022-10-12T18:50:33.734958241+0800]: ERROR: [install] install docker on 192.168.3.170 failed.
[2022-10-12T18:50:33.737472888+0800]: INFO: [install] install kube on 192.168.3.170
[2022-10-12T18:50:35.810410794+0800]: ERROR: [install] install kube on 192.168.3.170 failed.
[2022-10-12T18:50:35.812921722+0800]: INFO: [install] install haproxy on 192.168.3.169
[2022-10-12T18:50:36.759841364+0800]: ERROR: [install] install haproxy on 192.168.3.169 failed.
[2022-10-12T18:50:36.762073156+0800]: INFO: [install] install haproxy on 192.168.3.170
[2022-10-12T18:50:37.584764032+0800]: ERROR: [install] install haproxy on 192.168.3.170 failed.
[2022-10-12T18:50:37.587249084+0800]: INFO: [install] download kubeadm 10 years certs client
[2022-10-12T18:50:37.590267928+0800]: INFO: [download] kubeadm-linux-amd64
[2022-10-12T18:50:48.195842636+0800]: INFO: [download] kubeadm-linux-amd64 succeeded.
[2022-10-12T18:50:48.197858936+0800]: INFO: [install] scp kubeadm client to 192.168.3.168
[2022-10-12T18:50:52.747096147+0800]: INFO: [install] scp kubeadm client to 192.168.3.168 succeeded.
[2022-10-12T18:50:52.933245356+0800]: INFO: [install] 192.168.3.168: use kubeadm 10 years certs client succeeded.
[2022-10-12T18:50:52.938456285+0800]: INFO: [install] scp kubeadm client to 192.168.3.169
[2022-10-12T18:50:55.690758657+0800]: INFO: [install] scp kubeadm client to 192.168.3.169 succeeded.
[2022-10-12T18:50:55.875442409+0800]: INFO: [install] 192.168.3.169: use kubeadm 10 years certs client succeeded.
[2022-10-12T18:50:55.876689208+0800]: INFO: [install] scp kubeadm client to 192.168.3.170
[2022-10-12T18:50:58.532806543+0800]: INFO: [install] scp kubeadm client to 192.168.3.170 succeeded.
[2022-10-12T18:50:58.717203461+0800]: INFO: [install] 192.168.3.170: use kubeadm 10 years certs client succeeded.
[2022-10-12T18:50:58.718594715+0800]: INFO: [kubeadm init] kubeadm init on 192.168.3.168
[2022-10-12T18:50:58.719834943+0800]: INFO: [kubeadm init] 192.168.3.168: set kubeadmcfg.yaml
[2022-10-12T18:50:59.696698784+0800]: INFO: [kubeadm init] 192.168.3.168: set kubeadmcfg.yaml succeeded.
[2022-10-12T18:50:59.698069346+0800]: INFO: [kubeadm init] 192.168.3.168: kubeadm init start.
[2022-10-12T18:50:59.930399875+0800]: ERROR: [kubeadm init] 192.168.3.168: kubeadm init failed.

ERROR Summary:
[2022-10-12T18:50:20.767876909+0800]: ERROR: [install] install docker on 192.168.3.168 failed.
[2022-10-12T18:50:23.896461546+0800]: ERROR: [install] install kube on 192.168.3.168 failed.
[2022-10-12T18:50:26.176693401+0800]: ERROR: [install] install docker on 192.168.3.169 failed.
[2022-10-12T18:50:32.782616538+0800]: ERROR: [install] install kube on 192.168.3.169 failed.
[2022-10-12T18:50:33.734958241+0800]: ERROR: [install] install docker on 192.168.3.170 failed.
[2022-10-12T18:50:35.810410794+0800]: ERROR: [install] install kube on 192.168.3.170 failed.
[2022-10-12T18:50:36.759841364+0800]: ERROR: [install] install haproxy on 192.168.3.169 failed.
[2022-10-12T18:50:37.584764032+0800]: ERROR: [install] install haproxy on 192.168.3.170 failed.
[2022-10-12T18:50:59.930399875+0800]: ERROR: [kubeadm init] 192.168.3.168: kubeadm init failed.

See detailed log >>> /tmp/kainstall.yfiktiNMa2/kainstall.log

[root@localhost ~]#

from kainstall.

xy2019devl avatar xy2019devl commented on May 27, 2024

apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
kubernetesVersion: 1.25.2
controlPlaneEndpoint: apiserver.cluster.local:6443
networking:
dnsDomain: cluster.local
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/16
imageRepository: registry.cn-hangzhou.aliyuncs.com/kainstall
apiServer:
certSANs:

  • 127.0.0.1
  • apiserver.cluster.local
  • 192.168.3.168
    extraArgs:
    event-ttl: '"'"'720h'"'"'
    service-node-port-range: '"'"'30000-50000'"'"'

    审计日志相关配置

    audit-log-maxage: '"'"'20'"'"'
    audit-log-maxbackup: '"'"'10'"'"'
    audit-log-maxsize: '"'"'100'"'"'
    audit-log-path: /var/log/kube-audit/audit.log
    audit-policy-file: /etc/kubernetes/audit-policy.yaml
    extraVolumes:
  • name: audit-config
    hostPath: /etc/kubernetes/audit-policy.yaml
    mountPath: /etc/kubernetes/audit-policy.yaml
    readOnly: true
    pathType: File
  • name: audit-log
    hostPath: /var/log/kube-audit
    mountPath: /var/log/kube-audit
    pathType: DirectoryOrCreate
  • name: localtime
    hostPath: /etc/localtime
    mountPath: /etc/localtime
    readOnly: true
    pathType: File
    controllerManager:
    extraArgs:
    bind-address: 0.0.0.0
    node-cidr-mask-size: '"'"'24'"'"'
    deployment-controller-sync-period: '"'"'10s'"'"'
    node-monitor-grace-period: '"'"'20s'"'"'
    pod-eviction-timeout: '"'"'2m'"'"'
    terminated-pod-gc-threshold: '"'"'30'"'"'
    experimental-cluster-signing-duration: 87600h
    feature-gates: RotateKubeletServerCertificate=true
    extraVolumes:
  • hostPath: /etc/localtime
    mountPath: /etc/localtime
    name: localtime
    readOnly: true
    pathType: File
    scheduler:
    extraArgs:
    bind-address: 0.0.0.0
    extraVolumes:
  • hostPath: /etc/localtime
    mountPath: /etc/localtime
    name: localtime
    readOnly: true
    pathType: File

EOF'
Warning: Permanently added '192.168.3.168' (ECDSA) to the list of known hosts.
[2022-10-12T19:07:43.761456431+0800]: INFO: [kubeadm init] 192.168.3.168: set kubeadmcfg.yaml succeeded.
[2022-10-12T19:07:43.764183924+0800]: INFO: [kubeadm init] 192.168.3.168: kubeadm init start.
[2022-10-12T19:07:43.780797264+0800]: EXEC: [command] sshpass -p "zzzzzz" ssh -o ConnectTimeout=600 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected] -p 22 bash -c 'kubeadm init --config=/etc/kubernetes/kubeadmcfg.yaml --upload-certs'
Warning: Permanently added '192.168.3.168' (ECDSA) to the list of known hosts.
W1012 19:07:43.968540 43945 common.go:84] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta2". Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version.
W1012 19:07:43.969286 43945 common.go:84] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta2". Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version.
W1012 19:07:43.970358 43945 initconfiguration.go:119] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/var/run/dockershim.sock". Please update your configuration!
[init] Using Kubernetes version: v1.25.2
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: time="2022-10-12T19:07:43+08:00" level=fatal msg="unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory""
, error: exit status 1
[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
[2022-10-12T19:07:44.055132935+0800]: ERROR: [kubeadm init] 192.168.3.168: kubeadm init failed.

from kainstall.

xy2019devl avatar xy2019devl commented on May 27, 2024

用的v1.4.9脚本安装

from kainstall.

lework avatar lework commented on May 27, 2024

看这里面的日志,/tmp/kainstall.yfiktiNMa2/kainstall.log ,看错误是安装软件的时候出错了。

from kainstall.

xy2019devl avatar xy2019devl commented on May 27, 2024

from kainstall.

majulong avatar majulong commented on May 27, 2024

请问解决了吗 我好像也是同样问题 kubeadm init failed.

from kainstall.

lework avatar lework commented on May 27, 2024

1.25.2 新版本去除了一些参数和更换了镜像地址,已修复。

from kainstall.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.