Giter Club home page Giter Club logo

cloudnativer / kube-install Goto Github PK

View Code? Open in Web Editor NEW
410.0 410.0 111.0 124.27 MB

一键安装k8s(kubernetes):二進位離線方式部署,支持定時安裝、添加與銷毀node、銷毀與修復master、一鍵卸載集羣等。Install k8s (kubernetes): one click offline installation of highly available multiple kubernetes cluster, supports schedule installation, addition of nodes, rebuild of kubernetes master, and uninstallation of clusters.

License: Apache License 2.0

Shell 0.39% Go 20.04% Jinja 28.38% Makefile 0.01% CSS 9.57% HTML 0.48% JavaScript 41.12%
highly-available-clusters install-kubernetes k8s-install kubernetes-cluster offline-installer ops-tool

kube-install's People

Contributors

cloudnativer avatar houseonline avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kube-install's Issues

Kubernetes node add failed!

add node failed
logs:


[Info] 2022-06-16 16:58:14.38258995 +0800 CST m=+1655.018892666 Adding kubernetes node, please wait ...

Kubernetes Cluster Label: K8s-Cluster1
Kubernetes Node: 8.8.88.86
SSH Operation Port: 22
Operating System Type: rhel7
Automatically Upgrade OS Kernel: NO
System User for Operation: root

PLAY [addnode] *****************************************************************

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/genfile : 0.Distributing deployment files to target host, please wait...] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/genfile : file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/genfile : copy] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/genfile : copy] ***
changed: [8.8.88.86]

PLAY [addnode] *****************************************************************

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 1.Create base package directory] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : file] ***
ok: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 2.Perform installation pretreatment] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : shell] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 3.Turn off firewall] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : service] ***
fatal: [8.8.88.86]: FAILED! => {"changed": false, "msg": "Could not find the requested service ufw: host"}
...ignoring

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : service] ***
fatal: [8.8.88.86]: FAILED! => {"changed": false, "msg": "Could not find the requested service SuSEfirewall2: host"}
...ignoring

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 4.Turn off selinux] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 5.Turn off postfix] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 6.Set system limit] ***
changed: [8.8.88.86] => (item=* soft nofile 65536)
changed: [8.8.88.86] => (item=* hard nofile 65536)
changed: [8.8.88.86] => (item=* soft nproc 65536)
changed: [8.8.88.86] => (item=* hard nproc 65536)
changed: [8.8.88.86] => (item=* soft memlock unlimited)
changed: [8.8.88.86] => (item=* hard memlock unlimited)

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 7.Set ipvs_modules] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 8.Run ipvs_modules] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 9.Add sysctl parameter configuration] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 10.Set sysctl parameter configuration] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 11.Create journal directory] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 12.Create journal.conf.d directory] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 13.Add prophet file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 14.Start systemd-journald service] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 15.Install TTY software] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : copy] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 16.Create resolv config file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 17.Create k8s cert directory] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 18.Decompress k8s software package] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 19.Decompress cfssl software package] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/all : 20.Decompress helm software package] ***
changed: [8.8.88.86]

PLAY [addnode] *****************************************************************

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 1.Cleaning up garbage files left in history.] ***
fatal: [8.8.88.86]: FAILED! => {"changed": false, "msg": "Could not find the requested service kubelet: host"}
...ignoring

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : service] ***
fatal: [8.8.88.86]: FAILED! => {"changed": false, "msg": "Could not find the requested service kube-proxy: host"}
...ignoring

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : service] ***
fatal: [8.8.88.86]: FAILED! => {"changed": false, "msg": "Could not find the requested service containerd: host"}
...ignoring

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : shell] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
ok: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
ok: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
ok: [8.8.88.86] => (item=containerd)
ok: [8.8.88.86] => (item=containerd-shim)
ok: [8.8.88.86] => (item=containerd-shim-runc-v1)
ok: [8.8.88.86] => (item=containerd-shim-runc-v2)
ok: [8.8.88.86] => (item=nerdctl)
ok: [8.8.88.86] => (item=ctr)
ok: [8.8.88.86] => (item=runc)

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
ok: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
ok: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
ok: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
ok: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
ok: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 2.Create CNI plug-in directory] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 3.Decompress CNI plug-in package] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : unarchive] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 4.Create runtime config dir] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 5.Decompress runtime software package] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : template] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 6.Create containerd service] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 7.Create ipvsinit service] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 8.Create ipvsinit shell] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 9.Enable ipvsinit service] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 10.Start runtime service] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 11.Decompress runtime images package] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 12.Load runtime images] ***
changed: [8.8.88.86] => (item=metrics-server-amd64.tar)
changed: [8.8.88.86] => (item=metrics-scraper.tar)
changed: [8.8.88.86] => (item=heapster-amd64.tar)
changed: [8.8.88.86] => (item=pause-amd64.tar)
changed: [8.8.88.86] => (item=traefik.tar)
changed: [8.8.88.86] => (item=alpine.tar)
changed: [8.8.88.86] => (item=kubernetes-dashboard-v2.4.0-amd64.tar)
changed: [8.8.88.86] => (item=coredns.tar)
changed: [8.8.88.86] => (item=registry.tar)
changed: [8.8.88.86] => (item=calico-cni.tar)
changed: [8.8.88.86] => (item=calico-kube-controllers.tar)
changed: [8.8.88.86] => (item=calico-node.tar)
changed: [8.8.88.86] => (item=calico-pod2daemon-flexvol.tar)
changed: [8.8.88.86] => (item=flannel-cni-plugin.tar)
changed: [8.8.88.86] => (item=flannel.tar)
changed: [8.8.88.86] => (item=kube-router.tar)
changed: [8.8.88.86] => (item=weave-kube.tar)
changed: [8.8.88.86] => (item=weave-npc.tar)
changed: [8.8.88.86] => (item=cilium.tar)
changed: [8.8.88.86] => (item=cilium-operator-generic.tar)

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : 13.Set runtime images tag and create pushsysimages shell] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000base/runtime : shell] ***
changed: [8.8.88.86] => (item=metrics-server-amd64:v0.5.0)
changed: [8.8.88.86] => (item=metrics-scraper:v1.0.7)
changed: [8.8.88.86] => (item=heapster-amd64:v1.5.4)
changed: [8.8.88.86] => (item=pause-amd64:3.5)
changed: [8.8.88.86] => (item=traefik:v2.0.7)
changed: [8.8.88.86] => (item=alpine:3.6)
changed: [8.8.88.86] => (item=kubernetes-dashboard-amd64:v2.4.0)
changed: [8.8.88.86] => (item=coredns:1.3.1)
changed: [8.8.88.86] => (item=registry:v2.7.1)
changed: [8.8.88.86] => (item=calico-node:v3.19.3)
changed: [8.8.88.86] => (item=calico-pod2daemon-flexvol:v3.19.3)
changed: [8.8.88.86] => (item=calico-cni:v3.19.3)
changed: [8.8.88.86] => (item=calico-kube-controllers:v3.19.3)
changed: [8.8.88.86] => (item=flannel-cni-plugin:v1.0.0)
changed: [8.8.88.86] => (item=flannel:v0.15.1)
changed: [8.8.88.86] => (item=kube-router:v1.3.2)
changed: [8.8.88.86] => (item=weave-kube:2.8.1)
changed: [8.8.88.86] => (item=weave-npc:2.8.1)
changed: [8.8.88.86] => (item=cilium:v1.9.0)
changed: [8.8.88.86] => (item=cilium-operator-generic:v1.9.0)

PLAY [addnode] *****************************************************************

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kubelet : 1.Distribution kubelet cert] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kubelet : 2.Clean up invalid certificates] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kubelet : 3.Copy kubelet config and shell file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kubelet : copy] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kubelet : 4.Set IPVS rules] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kubelet : 5.Create /home/kube-install/k8s/kubernetes directory] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kubelet : file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kubelet : 6.Create kubelet service startup file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kubelet : 7.Start kubelet service] ***
changed: [8.8.88.86]

PLAY [addnode] *****************************************************************

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kube-proxy : 1.Create kube-proxy.config.yaml configuration] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kube-proxy : 2.Create /home/kube-install/k8s/kubernetes/kube-proxy directory] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kube-proxy : 3.Create kube-proxy service startup file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/kube-proxy : 4.Start kube-proxy service] ***
changed: [8.8.88.86]

PLAY [master1] *****************************************************************

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : 1.Enable csr-crb configuration] ***
changed: [8.8.88.81]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : shell] ***
changed: [8.8.88.81]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : shell] ***
changed: [8.8.88.81]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : shell] ***
changed: [8.8.88.81]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : shell] ***
changed: [8.8.88.81]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : 2.Wait 90s] ***
ok: [8.8.88.81]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : 3.Approve node csr] ***
fatal: [8.8.88.81]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/kubectl get csr | awk '/Pending/ {print $1}' | xargs kubectl certificate approve", "delta": "0:00:00.118209", "end": "2022-06-16 17:06:44.673905", "msg": "non-zero return code", "rc": 123, "start": "2022-06-16 17:06:44.555696", "stderr": "error: one or more CSRs must be specified as or -f ", "stderr_lines": ["error: one or more CSRs must be specified as or -f "], "stdout": "", "stdout_lines": []}
...ignoring

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : 4.Wait 30s] ***
ok: [8.8.88.81]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : 5. Setting scheduling label for k8s node] ***
changed: [8.8.88.81]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : shell] ***
changed: [8.8.88.81]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x0000000000node/approve-csr : shell] ***
changed: [8.8.88.81]

PLAY [addnode] *****************************************************************

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x00000000finish/addnode : Create reboot config file] ***
changed: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x00000000finish/addnode : Congratulations, node successfully joined kubernetes cluster! "The operating system will automatically restart to take effect on the cluster configuration."] ***
ok: [8.8.88.86]

TASK [/root/kube-install/data/output/K8s-Cluster1/sys/0x00000000finish/addnode : shell] ***
changed: [8.8.88.86]

PLAY RECAP *********************************************************************
8.8.88.81 : ok=11 changed=9 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1
8.8.88.86 : ok=77 changed=62 unreachable=0 failed=0 skipped=0 rescued=0 ignored=5

[Error] 2022-06-16 17:13:19.840843904 +0800 CST m=+2560.477146626 Kubernetes node add failed!


0.9-beta 初始化报错libcrypto.so.1.1

./kube-install -init -ostype "centos7"

Initialization in progress, please wait...

systemctl: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
systemctl: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
2024/01/31 17:11:23 Error waiting for command execution: exit status 127......
[Error] 2024-01-31 17:11:23.058575685 +0800 CST m=+1.565824484 Initialization failed, the basic dependency package is missing!

[root@localhost kube-install]#

may add admission-control attribute to set admission

code example:

WorkingDirectory={{k8s_install_home}}/kubernetes/kube-apiserver
ExecStart=/usr/local/bin/kube-apiserver \
--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,ResourceQuota,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook \
--feature-gates=ExpandInUsePersistentVolumes=true \
--advertise-address={{ip}} \
--bind-address=0.0.0.0 \
--insecure-bind-address=127.0.0.1 \

the MutatingAdmissionWebhook,ValidatingAdmissionWebhook is useful and commonly used, but it is not set default.
i know it may not nessery for everyone, but when you need use it, you need edit source code in kube-install/sys/0x00000000master/apiserver/templates/kube-apiserver.service-1.xx.j2, it difficult to update.

secret "harbor-secret" not found in kubelet status log.

kube-install version: 0.7.4
k8s version: 1.23.0
OS: centOS 7.9
[root@master1 ~]# systemctl status kubelet -l
● kubelet.service - Kubernetes Kubelet
Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; vendor preset: disabled)
Active: active (running) since 六 2021-12-18 20:25:32 EST; 39min ago
Docs: https://github.com/GoogleCloudPlatform/kubernetes
Process: 1942 ExecStartPre=/usr/local/bin/resolvinit.sh (code=exited, status=0/SUCCESS)
Main PID: 1944 (kubelet)
Tasks: 15
Memory: 166.1M
CGroup: /system.slice/kubelet.service
└─1944 /usr/local/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/ssl/bootstrap.kubeconfig --root-dir=/opt/kube-install/k8s/kubernetes/kubelet --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin/ --cert-dir=/etc/kubernetes/ssl --kubeconfig=/etc/kubernetes/ssl/kubelet.kubeconfig --config=/etc/kubernetes/kubelet.config.json --hostname-override=192.168.5.80 --pod-infra-container-image=192.168.5.82:5000/pause-amd64:3.1 --alsologtostderr=true --logtostderr=false --root-dir=/opt/kube-install/k8s/kubernetes/kubelet --log-dir=/opt/kube-install/k8s/kubernetes/kubelet --v=2

12月 18 20:55:37 master1 kubelet[1944]: I1218 20:55:37.734862 1944 container_manager_linux.go:511] "Discovered runtime cgroup name" cgroupName="/system.slice/docker.service"
12月 18 20:55:40 master1 kubelet[1944]: I1218 20:55:40.576092 1944 kubelet_pods.go:891] "Unable to retrieve pull secret, the image pull may not succeed." pod="kube-system/kube-dashboard-6d9bd6b985-7pptf" secret="" err="secret "harbor-secret" not found"
12月 18 20:57:07 master1 kubelet[1944]: I1218 20:57:07.577009 1944 kubelet_pods.go:891] "Unable to retrieve pull secret, the image pull may not succeed." pod="kube-system/kube-dashboard-6d9bd6b985-7pptf" secret="" err="secret "harbor-secret" not found"
12月 18 20:58:31 master1 kubelet[1944]: I1218 20:58:31.580915 1944 kubelet_pods.go:891] "Unable to retrieve pull secret, the image pull may not succeed." pod="kube-system/kube-dashboard-6d9bd6b985-7pptf" secret="" err="secret "harbor-secret" not found"
12月 18 20:59:38 master1 kubelet[1944]: I1218 20:59:38.582701 1944 kubelet_pods.go:891] "Unable to retrieve pull secret, the image pull may not succeed." pod="kube-system/kube-dashboard-6d9bd6b985-7pptf" secret="" err="secret "harbor-secret" not found"
12月 18 21:00:37 master1 kubelet[1944]: I1218 21:00:37.736187 1944 container_manager_linux.go:511] "Discovered runtime cgroup name" cgroupName="/system.slice/docker.service"
12月 18 21:00:59 master1 kubelet[1944]: I1218 21:00:59.579739 1944 kubelet_pods.go:891] "Unable to retrieve pull secret, the image pull may not succeed." pod="kube-system/kube-dashboard-6d9bd6b985-7pptf" secret="" err="secret "harbor-secret" not found"
12月 18 21:02:03 master1 kubelet[1944]: I1218 21:02:03.576123 1944 kubelet_pods.go:891] "Unable to retrieve pull secret, the image pull may not succeed." pod="kube-system/kube-dashboard-6d9bd6b985-7pptf" secret="" err="secret "harbor-secret" not found"
12月 18 21:03:19 master1 kubelet[1944]: I1218 21:03:19.579010 1944 kubelet_pods.go:891] "Unable to retrieve pull secret, the image pull may not succeed." pod="kube-system/kube-dashboard-6d9bd6b985-7pptf" secret="" err="secret "harbor-secret" not found"
12月 18 21:04:33 master1 kubelet[1944]: I1218 21:04:33.578235 1944 kubelet_pods.go:891] "Unable to retrieve pull secret, the image pull may not succeed." pod="kube-system/kube-dashboard-6d9bd6b985-7pptf" secret="" err="secret "harbor-secret" not found"

谢谢你的软件安装很成功,还不是很了解CNI网络,小白装Kube很好用,建议后期可以在设置界面设置网卡

我有五个服务器
1 master(123.123.123.123 -172.0.0.1)(ip没有绑定在机器上虚拟网卡可以解决)
2 node0(无外网 -172.0.0.2) (可以和master内网通信)
3 node1(无外网 -172.0.0.3) (可以和master内网通信)
4 node10(222.222.222.222-192.168.16.1)(和master外网通信 和node11内网可以通信)
5 node11(222.222.222.223-192.168.16.2)(和master外网通信 和node10内网可以通信)
使用你的软件我好像只能设置成建虚拟网卡全部使用外网网卡,也就是node0,node1也访问的是123.123.123.123 这个ip才可以实现集群,
不可以让node0,node1访问172.0.0.1,node10,node11访问123.123.123.123 来做集群
可以我没有去详细了解CNI网络,但是你的软件很好用,谢谢你的作品

在centos8.4安装v0.8.0版本失败

操作系统:
[root@k8snode04 ~]# cat /etc/redhat-release
CentOS Linux release 8.4.2105
内核版本:
[root@k8snode04 ~]# uname -a
Linux k8snode04 4.18.0-305.3.1.el8.x86_64 #1 SMP Tue Jun 1 16:14:33 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
kube-install版本:kube-install-allinone-v0.8.0.tgz
通过命令行安装失败:
[root@k8snode04 kube-install]# ./kube-install -exec sshcontrol -sship "192.168.50.54,192.168.50.55,192.168.50.56,192.168.50.57,192.168.50.58" -sshport 22 -sshpass "1qaz2wsx"

Opening SSH tunnel, please wait...

2022/10/11 12:57:01 Error waiting for command execution: exit status 1......
[Error] 2022-10-11 12:57:01.462401159 +0800 CST m=+260.489429147 Failed to open the SSH channel. Please use "root" user to manually open the SSH channel from the local host to the target host, or try to open the SSH channel again after executing the following command on the target host:


sudo sed -i "/PermitRootLogin/d" /etc/ssh/sshd_config
sudo sh -c "echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config"
sudo sed -i "/StrictHostKeyChecking/s/^#//; /StrictHostKeyChecking/s/ask/no/" /etc/ssh/ssh_config
sudo systemctl restart sshd

(If the SSH port of the host is not "22", use the "-sshport" to specify the correct port.)

Failed to open SSH tunnel!

[root@k8snode04 kube-install]#

root@k8snode04 kube-install]# ./kube-install -exec install -master "192.168.50.54,192.168.50.55,192.168.50.56" -node "192.168.50.54,192.168.50.55,192.168.50.56,192.168.50.57,192.168.50.58" -k8sver "1.24" -ostype "centos8" -label "k8s_prod" -softdir /data/k8s


[Info] 2022-10-11 12:23:49.96783815 +0800 CST m=+0.047450820 Installing kubernetes cluster, please wait ...

Kubernetes Cluster Label: k8s_prod
Kubernetes Version: Kubernetes v1.24
Kubernetes Master: 192.168.50.54,192.168.50.55,192.168.50.56
Kubernetes Node: 192.168.50.54,192.168.50.55,192.168.50.56,192.168.50.57,192.168.50.58
SSH Operation Port: 22
CNI Plug-in Type: flannel
Operating System Type: centos8
Automatically Upgrade OS Kernel: Not Support
System User for Installation: root

PLAY [master,node] *************************************************************

TASK [/root/kube-install/data/output/k8s_prod/sys/0x0000000000base/genfile : 0.Distributing deployment files to target host, please wait...] ***
fatal: [192.168.50.55]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host 192.168.50.55 port 22: Connection timed out", "unreachable": true}
fatal: [192.168.50.54]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host 192.168.50.54 port 22: Connection timed out", "unreachable": true}
fatal: [192.168.50.57]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host 192.168.50.57 port 22: Connection timed out", "unreachable": true}
fatal: [192.168.50.58]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host 192.168.50.58 port 22: Connection timed out", "unreachable": true}
fatal: [192.168.50.56]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host 192.168.50.56 port 22: Connection timed out", "unreachable": true}

PLAY RECAP *********************************************************************
192.168.50.54 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
192.168.50.55 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
192.168.50.56 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
192.168.50.57 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
192.168.50.58 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0

[Info] 2022-10-11 12:24:01.793613504 +0800 CST m=+11.873226174 Cleaning and detection after installation are in progress. Please wait ...

[Error] 2022-10-11 12:33:01.80195567 +0800 CST m=+551.881568381 Kubernetes cluster install failed! k8s_prod cluster status is unhealthy!


在图形界面安装时,状态显示未知,安装失败。

update kernel4.19 and updategrub error

update kernel4.19 and updategrub is a dangerous operation, can we add a confirmation option to this step。I've had two boot failures because of this,and I prefer to do this manually

不知道哪里有问题,安装出现5个ignore问题,service启动不了

TASK [/root/kube-install/data/output/cluster/sys/0x0000000000base/runtime : 1.Cleaning up garbage files left in history.] ***
fatal: [10.10.10.52]: FAILED! => {"changed": false, "msg": "Could not find the requested service kubelet: host"}
...ignoring
fatal: [10.10.10.51]: FAILED! => {"changed": false, "msg": "Could not find the requested service kubelet: host"}
...ignoring

TASK [/root/kube-install/data/output/cluster/sys/0x0000000000base/runtime : service] ***
fatal: [10.10.10.52]: FAILED! => {"changed": false, "msg": "Could not find the requested service kube-proxy: host"}
...ignoring
fatal: [10.10.10.51]: FAILED! => {"changed": false, "msg": "Could not find the requested service kube-proxy: host"}
...ignoring

TASK [/root/kube-install/data/output/cluster/sys/0x0000000000base/runtime : service] ***
fatal: [10.10.10.52]: FAILED! => {"changed": false, "msg": "Could not find the requested service containerd: host"}
...ignoring
fatal: [10.10.10.51]: FAILED! => {"changed": false, "msg": "Could not find the requested service containerd: host"}
...ignoring
........................
PLAY RECAP *********************************************************************
10.10.10.50 : ok=128 changed=115 unreachable=0 failed=0 skipped=0 rescued=0 ignored=5
10.10.10.51 : ok=85 changed=68 unreachable=0 failed=0 skipped=0 rescued=0 ignored=5
10.10.10.52 : ok=85 changed=68 unreachable=0 failed=0 skipped=0 rescued=0 ignored=5

[Info] 2022-01-09 08:41:26.594549917 -0500 EST m=+1013.176189743 Kubernetes cluster install completed!

系统上centos7
node上docker等service都启动不了
pod无法部署

docker registry上传镜像报HTTPS的错怎么解决?

ERRO[0000] server "192.168.1.191:5000" does not seem to support HTTPS error="failed to do request: Head "https://192.168.1.191:5000/v2/alpine/blobs/sha256:43773d1dba76c4d537b494a8454558a41729b92aa2ad0feb23521c3e58cd0440\": http: server gave HTTP response to HTTPS client"
INFO[0000] Hint: you may want to try --insecure-registry to allow plain HTTP (if you are in a trusted network)
FATA[0000] failed to do request: Head "https://192.168.1.191:5000/v2/alpine/blobs/sha256:43773d1dba76c4d537b494a8454558a41729b92aa2ad0feb23521c3e58cd0440": http: server gave HTTP response to HTTPS client

安装1.24版本失败,CNI插件Cilium,安装页面中显示集群状态为未知

你好!使用V0.8.0版本安装失败。CNI插件Cilium;系统CentOS Linux release 7.9.2009 (Core);内核:4.19.12-1.el7.elrepo.x86_64。
具体错误日志:
TASK [/opt/app/kube-install/data/output/k8s-anoncloud/sys/0x0000000000base/all : service] ***
fatal: [192.168.0.33]: FAILED! => {"changed": false, "msg": "Could not find the requested service ufw: host"}
...ignoring
fatal: [192.168.0.32]: FAILED! => {"changed": false, "msg": "Could not find the requested service ufw: host"}
...ignoring
fatal: [192.168.0.31]: FAILED! => {"changed": false, "msg": "Could not find the requested service ufw: host"}
...ignoring
fatal: [192.168.0.30]: FAILED! => {"changed": false, "msg": "Could not find the requested service ufw: host"}
...ignoring

TASK [/opt/app/kube-install/data/output/k8s-anoncloud/sys/0x0000000000base/all : service] ***
fatal: [192.168.0.33]: FAILED! => {"changed": false, "msg": "Could not find the requested service SuSEfirewall2: host"}
...ignoring
fatal: [192.168.0.31]: FAILED! => {"changed": false, "msg": "Could not find the requested service SuSEfirewall2: host"}
...ignoring
fatal: [192.168.0.32]: FAILED! => {"changed": false, "msg": "Could not find the requested service SuSEfirewall2: host"}
...ignoring
fatal: [192.168.0.30]: FAILED! => {"changed": false, "msg": "Could not find the requested service SuSEfirewall2: host"}
...ignoring

TASK [/opt/app/kube-install/data/output/k8s-anoncloud/sys/0x0000000000base/runtime : 1.Cleaning up garbage files left in history.] ***
fatal: [192.168.0.33]: FAILED! => {"changed": false, "msg": "Could not find the requested service kubelet: host"}
...ignoring
fatal: [192.168.0.32]: FAILED! => {"changed": false, "msg": "Could not find the requested service kubelet: host"}
...ignoring
fatal: [192.168.0.31]: FAILED! => {"changed": false, "msg": "Could not find the requested service kubelet: host"}
...ignoring
fatal: [192.168.0.30]: FAILED! => {"changed": false, "msg": "Could not find the requested service kubelet: host"}
...ignoring

TASK [/opt/app/kube-install/data/output/k8s-anoncloud/sys/0x0000000000base/runtime : service] ***
fatal: [192.168.0.33]: FAILED! => {"changed": false, "msg": "Could not find the requested service kube-proxy: host"}
...ignoring
fatal: [192.168.0.31]: FAILED! => {"changed": false, "msg": "Could not find the requested service kube-proxy: host"}
...ignoring
fatal: [192.168.0.32]: FAILED! => {"changed": false, "msg": "Could not find the requested service kube-proxy: host"}
...ignoring
fatal: [192.168.0.30]: FAILED! => {"changed": false, "msg": "Could not find the requested service kube-proxy: host"}
...ignoring

TASK [/opt/app/kube-install/data/output/k8s-anoncloud/sys/0x0000000000base/runtime : service] ***
fatal: [192.168.0.33]: FAILED! => {"changed": false, "msg": "Could not find the requested service containerd: host"}
...ignoring
fatal: [192.168.0.32]: FAILED! => {"changed": false, "msg": "Could not find the requested service containerd: host"}
...ignoring
fatal: [192.168.0.31]: FAILED! => {"changed": false, "msg": "Could not find the requested service containerd: host"}
...ignoring
fatal: [192.168.0.30]: FAILED! => {"changed": false, "msg": "Could not find the requested service containerd: host"}
...ignoring
安装页面中显示集群状态为未知,kubectl get node看不到node节点,只有master节点

centos7.8 installation of kubernetes 1.28 stuck, no response

base environment:
centos: 7.8
kube-install version: v0.9.0
install kunernetes single-node cluster, , version v1.28,the installation progress has been 0% for more than an hour, and there is no useful information in the log. Check which step it is stuck at, or check the specific reason,see the following screenshots for specific phenomena.
1
2

There are security vulnerabilities such as low version DOS security attack of `go-yaml` package.

检测到 cloudnativer/kube-install 一共引入了231个开源组件,存在3个漏洞

漏洞标题:go-yaml < 2.2.8拒绝服务漏洞
缺陷组件:gopkg.in/[email protected]
漏洞编号:CVE-2019-11254
漏洞描述:gopkg.in/yaml.v2是go语言中用于处理yaml格式的包。
在2.2.8之前的版本中,处理恶意的yaml数据时,会导致CPU资源耗尽。
漏洞由Kubernetes开发者在fuzz测试中发现并提交修复补丁。
国家漏洞库信息:https://www.cnvd.org.cn/flaw/show/CNVD-2020-35519
影响范围:(∞, 2.2.8)
最小修复版本:2.2.8
缺陷组件引入路径:kube-install@->github.com/gin-gonic/[email protected]>github.com/stretchr/[email protected]>gopkg.in/[email protected]
kube-install@->github.com/leodido/[email protected]>github.com/stretchr/[email protected]>gopkg.in/[email protected]
kube-install@->k8s.io/[email protected]>github.com/go-openapi/[email protected]>gopkg.in/[email protected]
kube-install@->k8s.io/[email protected]>github.com/stretchr/[email protected]>gopkg.in/[email protected]

另外还有3个漏洞,详细报告:https://mofeisec.com/jr?p=aea335

在部分centos7系统上遇到内核升级这一步失败的问题

TASK [/root/kube-install/data/output/yangzujie_cluster/sys/0x0000000000base/kernel : 3.Update kernel and grub] ***
changed: [10.0.4.11]
changed: [172.17.0.17]

TASK [/root/kube-install/data/output/yangzujie_cluster/sys/0x0000000000base/kernel : shell] ***
fatal: [172.17.0.17]: FAILED! => {"changed": true, "cmd": "/opt/kube-install/k8s/temp/updategrub.sh", "delta": "0:02:28.713121", "end": "2022-03-27 22:02:22.132428", "msg": "non-zero return code", "rc": 1, "start": "2022-03-27 21:59:53.419307", "stderr": "warning: /tmp/.kubeinstalltemp/data/yangzujie_cluster/temp/kernel4.19/kernel-ml-4.19.12-1.el7.elrepo.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY\n/opt/kube-install/k8s/temp/updategrub.sh: line 18: 1\n2-1: syntax error in expression (error token is "2-1")", "stderr_lines": ["warning: /tmp/.kubeinstalltemp/data/yangzujie_cluster/temp/kernel4.19/kernel-ml-4.19.12-1.el7.elrepo.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY", "/opt/kube-install/k8s/temp/updategrub.sh: line 18: 1", "2-1: syntax error in expression (error token is "2-1")"], "stdout": "", "stdout_lines": []}
fatal: [10.0.4.11]: FAILED! => {"changed": true, "cmd": "/opt/kube-install/k8s/temp/updategrub.sh", "delta": "0:03:18.314072", "end": "2022-03-27 22:03:10.307655", "msg": "non-zero return code", "rc": 1, "start": "2022-03-27 21:59:51.993583", "stderr": "warning: /tmp/.kubeinstalltemp/data/yangzujie_cluster/temp/kernel4.19/kernel-ml-4.19.12-1.el7.elrepo.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY\n/opt/kube-install/k8s/temp/updategrub.sh: line 18: 1\n2-1: syntax error in expression (error token is "2-1")", "stderr_lines": ["warning: /tmp/.kubeinstalltemp/data/yangzujie_cluster/temp/kernel4.19/kernel-ml-4.19.12-1.el7.elrepo.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY", "/opt/kube-install/k8s/temp/updategrub.sh: line 18: 1", "2-1: syntax error in expression (error token is "2-1")"], "stdout": "", "stdout_lines": []}

PLAY RECAP *********************************************************************
10.0.4.11 : ok=81 changed=64 unreachable=0 failed=1 skipped=0 rescued=0 ignored=5
172.17.0.17 : ok=175 changed=139 unreachable=0 failed=1 skipped=0 rescued=0 ignored=7

[Error] 2022-03-27 22:03:11.883827535 +0800 CST m=+43248.461014392 Kubernetes install failed! There is an error in the process!


kube-install init failed

help please

[root@Centos7_6 kube-install]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@Centos7_6 kube-install]# ./kube-install -init -ostype "centos7"

Initialization in progress, please wait...

Notice: If you are prompted to enter the password below, please enter the root password again!
2024/01/10 15:42:05 Error waiting for command execution: exit status 127......

[Error] 2024-01-10 15:42:05.394895694 +0800 CST m=+2.765850800 Initialization failed ! There is a problem with the local SSH key.

Recommendations:
    If the SSH port of the host is not "22", use the "-sshport" to specify the correct port.
    (Please try again with root user)

Initialization failed!

[root@Centos7_6 kube-install]# netstat -ntlp | grep sshd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      181932/sshd: /usr/s
tcp6       0      0 :::22                   :::*                    LISTEN      181932/sshd: /usr/s
[root@Centos7_6 kube-install]# whoami
root

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.