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

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.
主站蜘蛛池模板: 肥西县| 洱源县| 陕西省| 六枝特区| 循化| 辉县市| 广州市| 昌都县| 鹿泉市| 乐清市| 道孚县| 定安县| 南郑县| 湘西| 桃园市| 沁水县| 长宁县| 略阳县| 桐梓县| 平武县| 花垣县| 寻乌县| 二连浩特市| 宜春市| 南召县| 云林县| 襄城县| 嘉鱼县| 吉隆县| 连州市| 通海县| 阳东县| 九龙县| 穆棱市| 澄城县| 松溪县| 遵义县| 陵水| 东阿县| 同仁县| 武鸣县|