kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch02/lab
2024-02-20 17:15:27 +08:00
..
solution 新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件 2024-02-20 17:15:27 +08:00
pod.yaml 新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件 2024-02-20 17:15:27 +08:00
README.md 新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件 2024-02-20 17:15:27 +08:00

kubectl apply -f solution/deployment.yaml

kubectl port-forward deploy/whoami 8080:80

curl http://localhost:8080

"I'm whoami-687976f48b-tkxp9 running on Linux 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019"

kubectl get pods -o custom-columns=NAME:metadata.name

whoami-68bf776fd-s6sr9

kubectl exec deploy/whoami -- sh -c 'hostname'

whoami-687976f48b-tkxp9