欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 新车 > kubekey在ubuntu24实现kubernetes快速安装

kubekey在ubuntu24实现kubernetes快速安装

2024/10/24 10:26:45 来源:https://blog.csdn.net/holdlg/article/details/140318097  浏览:    关键词:kubekey在ubuntu24实现kubernetes快速安装

基于Ubunut24.04安装

设置主机名

hostnamectl set-hostname kkmain
hostnamectl set-hostname kknode1
hostnamectl set-hostname kknode2

关闭swap

sudo swapoff -a
sudo sed -i 's/.*swap.*/#&/' /etc/fstab

安装kubekey

export KKZONE=cn
curl -sfL https://get-kk.kubesphere.io | sh -

查看版本

./kk -h
./kk version
./kk version --help
./kk version --show-supported-k8s

安装依赖

sudo apt install socat conntrack ebtables ipset -y

生成对应版本的k8s配置文件

./kk create config --with-kubernetes 1.28.8

修改控制平面,节点

vi config-sample.yaml 

创建集群

./kk create cluster -f config-sample.yaml

--------等待集群创建完成(依赖网络)--------

查看是否安装完成,正常运行,状态全部Running

kubectl get pod -A

安装kubesphere企业版

kubesphere企业版的应用商店插件服务收费,云服务集群收费。自建本机k8s管理和基础功能不收费

如果介意kubesphere企业版服务策略,可以安装kubesphere开源版,参见https://kubesphere.io

chart=oci://hub.kubesphere.com.cn/kse/ks-core
version=1.0.8helm upgrade --install -n kubesphere-system --create-namespace ks-core $chart --debug --wait --set cloud.enabled=true --version $version

查看是否安装完成

kubectl get pod -A

参考链接

https://docs.kubesphere.com.cn/v4.1.1/03-installation-and-upgrade/02-install-kubesphere/02-install-kubernetes-and-kubesphere/
https://github.com/kubesphere/kubekey/blob/master/README_zh-CN.md

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com