当前位置:   article > 正文

K8S测试pod

K8S测试pod

背景

用于测试ping,curl等类型的pod

Centos pod

  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: centos-deployment
  5. labels:
  6. app: centos
  7. spec:
  8. replicas: 1
  9. selector:
  10. matchLabels:
  11. app: centos
  12. template:
  13. metadata:
  14. labels:
  15. app: centos
  16. spec:
  17. containers:
  18. - name: centos
  19. image: centos:7
  20. imagePullPolicy: IfNotPresent
  21. command: ["/bin/sh","-ce","tail -f /dev/null"]
  22. ports:
  23. - containerPort: 22

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号