使用kubeKey安装k8s+kubesphere
456 字
2 分钟
使用kubeKey安装k8s+kubesphere
以下内容均参考kubesphere官网
1.准备主机(略)
2.下载kubeKey
-
如果网络不能访问GitHub,务必执行下面的命令
Terminal window export KKZONE=cn -
下载kubeKey
Terminal window curl -sfL https://get-kk.kubesphere.io | VERSION=v1.2.1 sh - -
添加可执行权限
Terminal window chmod +x kk
3.创建集群
-
创建配置文件
Terminal window ./kk create config --with-kubesphere v3.2.1 --with-kubernetes v1.21.5 -f config-sample.yaml -
编辑调整配置文件-以下内容来自官网(仅供参考)
#vi ~/config-sample.yamlapiVersion: kubekey.kubesphere.io/v1alpha1kind: Clustermetadata:name: config-samplespec:hosts:- {name: master1, address: 172.24.107.72, internalAddress: 172.24.107.72, user: root, password: QWEqwe123}- {name: master2, address: 172.24.107.73, internalAddress: 172.24.107.73, user: root, password: QWEqwe123}- {name: master3, address: 172.24.107.74, internalAddress: 172.24.107.74, user: root, password: QWEqwe123}- {name: node1, address: 172.24.107.75, internalAddress: 172.24.107.75, user: root, password: QWEqwe123}- {name: node2, address: 172.24.107.76, internalAddress: 172.24.107.76, user: root, password: QWEqwe123}- {name: node3, address: 172.24.107.77, internalAddress: 172.24.107.77, user: root, password: QWEqwe123}roleGroups:etcd:- master1- master2- master3master:- master1- master2- master3worker:- node1- node2- node3controlPlaneEndpoint:domain: lb.kubesphere.localaddress: "39.104.82.170"port: 6443kubernetes:version: v1.17.9imageRepo: kubesphereclusterName: cluster.localmasqueradeAll: false # masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode. [Default: false]maxPods: 110 # maxPods is the number of pods that can run on this Kubelet. [Default: 110]nodeCidrMaskSize: 24 # internal network node size allocation. This is the size allocated to each node on your network. [Default: 24]proxyMode: ipvs # mode specifies which proxy mode to use. [Default: ipvs]network:plugin: calicocalico:ipipMode: Always # IPIP Mode to use for the IPv4 POOL created at start up. If set to a value other than Never, vxlanMode should be set to "Never". [Always | CrossSubnet | Never] [Default: Always]vxlanMode: Never # VXLAN Mode to use for the IPv4 POOL created at start up. If set to a value other than Never, ipipMode should be set to "Never". [Always | CrossSubnet | Never] [Default: Never]vethMTU: 1440 # The maximum transmission unit (MTU) setting determines the largest packet size that can be transmitted through your network. [Default: 1440]kubePodsCIDR: 10.233.64.0/18kubeServiceCIDR: 10.233.0.0/18registry:registryMirrors: []insecureRegistries: []addons: []···# 其它配置可以在安装后之后根据需要进行修改 -
持久化存储配置-待研究 暂时默认(OpenEBS)
-
安装集群
Terminal window ./kk create cluster -f config-sample.yaml -
查看 KubeSphere 安装日志
Terminal window kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
文章分享
如果这篇文章对你有帮助,欢迎分享给更多人!
使用kubeKey安装k8s+kubesphere
https://tianch.com.cn/posts/tutorials/shi-yong-kubekey-an-zhuang-k8s-kubesphere/相关文章智能推荐
1
kubesphere+k8s下devops使用maven-jdk11镜像
Kubernetes将配置-配置字典-jenkins-casc-config里面maven的image改成
2
k8s基操之-yaml
Kubernetes--dry-run 尝试部署
3
ks8集群基操演练
Kubernetes意思是tomcat8.5是无效的名字 标签必须由小写字母数字字符或“-”组成,以字母字符开头,以字母数字字符结尾(例如,“我的名字”或“abc-123”,用于验证的regex是“[a-z]([-a-z0-9][a-z0-9])
4
k8s+helm安装skywalking
中间件我安装时的最新版本是封装的4.2.0版本 注意你下载时的版本
5
k8s集群搭建
Kubernetes[preflight] Running pre-flight checks
随机文章随机推荐


