Skip to main content

kubeshpere

kubeshpere的安装部署可参考, kubeshpere 官方文档

kubekey工具的安装部署可参考 kubekey 官方文档

kubekey入门课程参考 kubekey 云原生入门课程

安装kubesphere的前置条件

更改主机名称,不能有大写字母
hostnamectl set-hostname node01 && bash
安装依赖工具
yum install -y socat conntrack ebtables ipset ipvsadm  lrzsz  curl openssl tar wget bash-completion
关闭防火墙
sudo systemctl stop firewalld.service 
sudo systemctl disable firewalld.service
关闭swap
free -h
sudo swapoff -a
sudo sed -i 's/.*swap.*/#&/' /etc/fstab
free -h
关闭selinux
getenforce
cat /etc/selinux/config
sudo setenforce 0
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
cat /etc/selinux/config
使用kubekey指定版本安装
export KKZONE=cn
./kk create cluster --with-kubernetes v1.23.10 --with-kubesphere v3.4.0

linux和k8s命令自动补全

方法1
sudo yum -y install bash-completion

source <(kubectl completion bash)

echo "source <(kubectl completion bash)" >> ~/.bashrc

source ~/.bashrc

#source /etc/profile
方法2
# 安装 bash-completion
apt-get install bash-completion

# 将 completion 脚本添加到你的 ~/.bashrc 文件
echo 'source <(kubectl completion bash)' >>~/.bashrc

# 将 completion 脚本添加到 /etc/bash_completion.d 目录
kubectl completion bash >/etc/bash_completion.d/kubectl