k8s容器探针

root@node01:~# kubectl get pod pod-demo -owide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod-demo 1/1 Running 0 10d 10.244.2.6 node03 <none> <none>

root@node01:~# curl 10.244.2.6
iKubernetes demoapp v1.0 !! ClientIP: 10.244.0.0, ServerName: pod-demo, ServerIP: 10.244.2.6!


root@node01:~# kubectl get pod pod-demo -o jsonpath={.status.podIP}
10.244.2.6

 

root@node01:~# curl -s http://10.244.2.6/

iKubernetes demoapp v1.0 !! ClientIP: 10.244.0.0, ServerName: pod-demo, ServerIP: 10.244.2.6!


root@node01:~# curl -s http://10.244.2.6/hostname
ServerName: pod-demo


root@node01:~# curl -s http://10.244.2.6/user-agent
User-Agent: curl/7.58.0


root@node01:~# curl -s http://10.244.2.6/livez
OK

root@node01:~# curl -s http://10.244.2.6/readyz
OK

root@node01:~# curl -s http://10.244.2.6/configs
DEPLOYENV: Production
RELEASE: Stable

posted @ 2021-12-10 17:34  JASON_yul  阅读(69)  评论(0)    收藏  举报