透過這幾篇文章,相信我們已經透過kubernetes-the-hard-way的方式,將k8s叢集搭建成功了,那麼如何進行驗證呢?無非就是新建一個daemonset嘛,然後透過檢測各種網路連通性驗證,那麼話不多說,直接來實操吧。
新建nginx的yaml檔案
# 建立配置檔案[root@node1 ~]# cat > nginx-ds。yml < 檢查IP地址連通性 # 獲取到pod的IP地址[root@node1 ~]# kubectl get pod -o wideNAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATESnginx-ds-m8wrf 1/1 Running 0 2m31s 10。200。135。3 node3 If you see this page, the nginx web server is successfully installed andworking。 Further configuration is required。 For online documentation and support please refer tonginx。org。 Thank you for using nginx。 檢查dns # 建立一個nginx的pod[root@node1 ~]# cat > pod-nginx。yaml < 日誌功能 剩餘內容請轉至VX公眾號 “運維家” ,回覆 “125” 檢視。Welcome to nginx!
Commercial support is available atnginx。com。