ASP.NET Core微服务 on K8S

默认教学计划
322人加入学习
(0人评价)
价格 ¥598.00
教学计划
承诺服务

Pod重启策略

Always: 总是重启

OnFailure:Pod phase becomes Succeeded

Never:

[展开全文]

1.编辑hosts文件,配置主、子节点信息(重点别忘了配置)

vi /etc/hosts

192.168.80.129 master

192.168.80.130 node01

(同学说的)如果没先配置host 加入子节点加入集群会报错,Master 也无法启动,自己试过确实如此

2.记得永久禁用SELINUX、swapoff

3.kubeadm init,我安装的时候已经

kubernetes-version=1.14.2 、如果另外版本根据提示替换吧

4.镜像可以先拉取的,镜像下载一时快一时慢,有点蛋疼。还有注意一下网络插件需要在主子节点都要有镜像的,如果子节点不能正常启动失败可能是下载镜像失败了

主节点镜像

docker pull registry.aliyuncs.com/google_containers/kube-proxy:v1.14.2

docker pull registry.aliyuncs.com/google_containers/kube-apiserver:v1.14.2

docker pull registry.aliyuncs.com/google_containers/kube-controller-manager:v1.14.2

docker pull registry.aliyuncs.com/google_containers/kube-scheduler:v1.14.2

docker pull registry.aliyuncs.com/google_containers/coredns:1.3.1

docker pull registry.aliyuncs.com/google_containers/etcd:3.3.10

docker pull registry.aliyuncs.com/google_containers/pause:3.1

docker pull quay.io/coreos/flannel:v0.11.0-amd64

 

子节点镜像

docker pull registry.aliyuncs.com/google_containers/kube-proxy:v1.14.2

docker pull registry.aliyuncs.com/google_containers/pause:3.1

docker pull quay.io/coreos/flannel:v0.11.0-amd64

flannel 镜像不能确定是否都一样,不过先pull 也没关系. 

 

5.查看pod 信息 用以下命令

kubectl describe pods --namespace kube-system kube-flannel-ds-amd64-prv26
 

[展开全文]

kubeadm token create --print-join-command

[展开全文]

shimo.im/docs/VdJmj2iGhpEGNFTv

[展开全文]