mysql连接测试不成功的原因有哪些
259
2022-10-20
linux安装KubeSphere
linux安装KubeSphere
介绍
KubeSphere 是在目前主流容器调度平台 Kubernetes 之上构建的企业级分布式多租户容器平台,提供简单易用的操作界面以及向导式操作方式,在降低用户使用容器调度平台学习成本的同时,极大减轻开发、测试、运维的日常工作的复杂度,旨在解决 Kubernetes 本身存在的存储、网络、安全和易用性等痛点。除此之外,平台已经整合并优化了多个适用于容器场景的功能模块,以完整的解决方案帮助企业轻松应对敏捷开发与自动化运维、微服务治理、多租户管理、工作负载和集群管理、服务与网络管理、应用编排与管理、镜像仓库管理和存储管理等业务场景。
KubeSphere安装
先要安装k8s
在master节点上安装k8s
hostnamectl set-hostname q-master
reboot
sudo yum remove docker*
sudo yum install -y yum-utils
#配置docker的yum地址
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
#安装指定版本
sudo yum install -y docker-ce-20.10.7 docker-ce-cli-20.10.7 containerd.io-1.4.6
#启动&开机启动docker
systemctl enable docker --now
# docker加速配置
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://82m9ar63.mirror.aliyuncs.com"],
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo setenforce 0
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
#关闭swap
swapoff -a
sed -ri 's/.*swap.*/#&/' /etc/fstab
#允许 iptables 检查桥接流量
cat <
安装网络插件
#安装网络插件 vi calico.yaml kubectl apply -f calico.yaml kubectl get pod -A watch -n 1 kubectl get pod -A yum install -y nfs-utils # 在master 执行以下命令 echo "/nfs/data/ *(insecure,rw,sync,no_root_squash)" > /etc/exports # 执行以下命令,启动 nfs 服务;创建共享目录 mkdir -p /nfs/data # 在master执行 systemctl enable rpcbind systemctl enable nfs-server systemctl start rpcbind systemctl start nfs-server # 使配置生效 exportfs -r #检查配置是否生效 exportfs
安装其他插件
vi default-storage.yaml kubectl apply -f default-storage.yaml watch -n 1 kubectl get pod -A vi metrics-server.yaml kubectl apply -f metrics-server.yaml watch -n 1 kubectl get pod -A kubectl describe pod nfs-client-provisioner-df6455b66-d97z5 kubectl describe node q-master kubectl taint nodes node-role.kubernetes.io/master:NoSchedule- kubectl taint nodes q-master node-role.kubernetes.io/master:NoSchedule- watch -n 1 kubectl get pod -A
安装kubesphere
vi kubesphere-installer.yaml apply -f kubesphere-installer.yaml kubectl apply -f kubesphere-installer.yaml vi cluster-configuration.yaml kubectl apply -f cluster-configuration.yaml vi cluster-configuration.yaml rm -f cluster-configuration.yaml vi cluster-configuration.yaml kubectl apply -f cluster-configuration.yaml kubectl get pod -A kubectl apply -f cluster-configuration.yaml apply -f kubesphere-installer.yaml kubectl apply -f kubesphere-installer.yaml rm -f cluster-configuration.yaml vi cluster-configuration.yaml kubectl apply -f cluster-configuration.yaml kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f kubectl get pod -A kubectl get no curl http://172.16.0.22:30880 kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f curl 133.198.29.22:30880 curl 172.16.0.22:30880 kubectl edit daemonset -n kube-system calico-node kubectl get no kubectl delete node edgenode-1 kubectl edit daemonset -n kube-system calico-node kubectl edit daemonset -n kube-system kube-proxy kubectl edit daemonset -n kube-system nodelocaldns
参考链接:https://blog.csdn.net/An1090239782/article/details/110038285https://kubesphere.io/zh/docs/quick-start/minimal-kubesphere-on-k8s/https://yuque.com/leifengyang/oncloud/gz1sls
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~