- Learn OpenShift
- Denis Zuev Artemii Kropachev Aleksey Usov
- 178字
- 2021-08-13 16:03:52
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.
推薦閱讀
- 精通Linux內核開發
- Windows Vista融會貫通
- 奔跑吧 Linux內核(入門篇)
- 計算機系統的自主設計
- VMware Horizon View Essentials
- Windows 7實戰從入門到精通(超值版)
- 鴻蒙操作系統設計原理與架構
- 從零開始學安裝與重裝系統
- iOS 10 開發指南
- Learning Continuous Integration with Jenkins(Second Edition)
- 鴻蒙入門:HarmonyOS應用開發
- Linux系統管理初學者指南:基于CentOS 7.6
- Getting Started with Raspberry Pi Zero
- 樹莓派+傳感器:創建智能交互項目的實用方法、工具及最佳實踐
- 分布式實時處理系統:原理、架構與實現