官术网_书友最值得收藏!

Describing Kubernetes resources 

We can quickly take a look at the internals of this pod by running the kubectl describe command:

$ kubectl describe pod httpd-8576c89d7-qjd62
Name: httpd
Namespace: default
Node: minikube/192.168.99.101
Start Time: Sat, 10 Mar 2018 00:01:33 -0700
Annotations: <none>
Status: Running
IP: 172.17.0.4
...
<output omitted>
...

It gives us enough information to efficiently locate the pod and do the proper troubleshooting when necessary. In our case, we can ssh to Minikube VM and run the curl command to check if the pod is running the web server properly. 

You may need to use another IP address for the curl command; in our case it is  172.17.0.4, derived from the kubectl describe command output.
$ minikube ssh
$
$ curl 172.17.0.4
<html><body><h1>It works!</h1></body></html>
$ exit
Note that this pod is accessible only inside the Kubernetes cluster. That is the reason why we need to log in to Minikube VM. If we try to access this address from our local PC, it will not work. We are going to discuss this in the following sections.
主站蜘蛛池模板: 竹北市| 罗源县| 皋兰县| 从江县| 汪清县| 巨野县| 万宁市| 通许县| 京山县| 福鼎市| 霸州市| 北海市| 开鲁县| 玉门市| 水城县| 福州市| 北宁市| 福泉市| 慈溪市| 湟中县| 社旗县| 长治县| 百色市| 四子王旗| 军事| 大丰市| 鹤庆县| 福安市| 诸城市| 马关县| 密云县| 南通市| 监利县| 饶平县| 盐池县| 肃北| 通州市| 佳木斯市| 汕尾市| 天柱县| 邻水|