其他分享
首页 > 其他分享> > k8s安装

k8s安装

作者:互联网

安装 kuberspere管理集群工具会自带安装k8s

1步:export KKZONE=cn

2步:curl -sfL https://get-kk.kubesphere.io | VERSION=v2.0.0 sh –

 

3步:chmod +x kk

 

4步:./kk create cluster --with-kubernetes v1.21.5 --with-kubesphere v3.2.1

5步:先把命令复制下来: yum install conntrack

 

[kubernetes]

name=Kubernetes

baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64

enabled=1

gpgcheck=0

repo_gpgcheck=0

gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg

 

5:打开文件vi  /etc/yum.repos.d/kubernetes.repo

 

6填入

 

7步:wq!

8步:yum install kubectl –y

9步:

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.2.1/kubesphere-installer.yaml

  

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.2.1/cluster-configuration.yaml

 

最后一步检查:k8s的管理工具是否安装完成

装这个的时候自带安装k8s

kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') –f

 

 

命令执行完成后出现如图所示

访问: http://192.168.80.69:30880/账号密码在图里面会显示

 

 

 

 

 

 

标签:kubectl,kubernetes,com,kubesphere,yum,https,k8s,安装
来源: https://www.cnblogs.com/LZXX/p/16409812.html