Jun 152021
这篇文章是参考青云的文章,我在CentOS 上重新测试一遍。
我目前测试基本都是在阿里云香港上启动spot 虚拟机,这样的成本很低,也可以满足网络的需求。
kebekey
wget https://github.com/kubesphere/kubekey/releases/download/v1.1.0/kubekey-v1.1.0-linux-64bit.rpm
rpm -ivh kubekey-v1.1.0-linux-64bit.rpm
kubernetes 配置文件
kk create config --with-kubernetes v1.19.8
编辑配置文件
apiVersion: kubekey.kubesphere.io/v1alpha1
kind: Cluster
metadata:
name: sample
spec:
hosts:
{name: cilium, address: 192.168.10.4, internalAddress: 192.168.10.4, user: root, password: Chenshake1208} roleGroups: etcd: cilium
master:
cilium
worker:
cilium
controlPlaneEndpoint:
domain: lb.kubesphere.local
address: ""
port: 6443
kubernetes:
version: v1.19.8
imageRepo: kubesphere
clusterName: cluster.local
network:
plugin: cilium
kubePodsCIDR: 10.233.64.0/18
kubeServiceCIDR: 10.233.0.0/18
registry:
registryMirrors: []
insecureRegistries: []
初始化
kk init os -f config-sample.yaml
部署kubesphere
kk create cluster -f config-sample.yaml --with-kubesphere v3.1.0
Hubble
kubectl apply -f https://raw.githubusercontent.com/cilium/cilium/1.9.7/install/kubernetes/quick-hubble-install.yaml