利用KubeSphere提供KubeKey同时安装KubeSphere和K8S,安装步骤如下:
yum -y update
firewall-cmd --state
systemctl stop firewalld.service
yum install -y socat
yum install -y conntrack
yum install -y ebtables
yum install -y ipset
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F
export KKZONE=cn
curl -sfL https://get-kk.kubesphere.io | VERSION=v2.0.0 sh -
chmod +x kk
./kk version --show-supported-k8s
./kk create cluster --with-kubernetes v1.21.5 --with-kubesphere v3.2.1
./kk create config --with-kubernetes v1.21.5 --with-kubesphere v3.2.1 -f config-sample.yaml
#修改配置文件 config-sample.yaml
vim config-sample.yaml
#修改点1:指定节点的port
192.168.133.167,port: 22000 ,user: root, password: ***
#修改点2:搜索 openpitrix,并将 enabled 的 false 改为 true,完成后保存文件。
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
journalctl -xeu kubelet
journalctl -u flannel
journalctl -ex |grep failed
重新创建配置文件
./kk delete cluster -f config-sample.yaml
./kk create cluster -f config-sample.yaml
列出 node 和pod
kubectl get nodes
kubectl get pod --all-namespaces
重启pod
kubectl scale deployment ks-controller-manager --replicas=0 -n kubesphere-systemjou
kubectl scale deployment ks-controller-manager --replicas=1 -n kubesphere-system
https://kubesphere.io/zh/docs/v3.3/quick-start/all-in-one-on-linux/
https://kubernetes.io/zh/docs/setup/#learning-environment
https://www.runoob.com/linux/linux-comm-chmod.html
https://www.runoob.com/docker/centos-docker-install.html
https://blog.csdn.net/qq_37203082/article/details/123621531