验证kuberneters集群
在任意一个运算节点,创建一个资源配置清单
这里我们选择DHSS7-21.host.com主机
[root@hdss7-22 ~]# cd /root/
[root@hdss7-22 ~]# vi /root/nginx-ds.yaml
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: nginx-ds
spec:
template:
metadata:
labels:
app: nginx-ds
spec:
containers:
- name: my-nginx
image: harbor.od.com/public/nginx:v1.7.9
ports:
- containerPort: 80
测试完删除
[root@hdss7-22 ~]# kubectl create -f nginx-ds.yaml
daemonset.extensions/nginx-ds created
[root@hdss7-22 ~]# kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
nginx-ds-72zm5 1/1 Running 0 86s 172.7.21.2 hdss7-21.host.com <none> <none>
nginx-ds-cb7ct 1/1 Running 0 86s 172.7.22.2 hdss7-22.host.com <none> <none>
[root@hdss7-22 ~]# kubectl get cs
NAME STATUS MESSAGE ERROR
scheduler Healthy ok
controller-manager Healthy ok
etcd-0 Healthy {"health": "true"}
etcd-2 Healthy {"health": "true"}
etcd-1 Healthy {"health": "true"}
[root@localhost ~]# kubectl get node
NAME STATUS ROLES AGE VERSION
hdss7-21.host.com Ready master,node 3h55m v1.15.2
hdss7-22.host.com Ready master,node 3h27m v1.15.2
# 以上所有状态检查正常时,说明集群搭建成功
[root@hdss7-22 ~]# kubectl delete -f nginx-ds.yaml
实现一整套的K8S生态的搭建,并实战交付一套dubbo(java)微服务,我们要一步步实现以下工作。
1.持续集成
2.配置中心
3.监控意向图
4.日志收集分析系统
5.自动化运维平台(最终实现基于K8S的开源Paas平台)
资源要求:
2c/2g/50g x 3 + 4c/4g/50g x 2