deployment.yaml 809 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: namespace-test-busybox
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: namespace-test-busybox
  9. template:
  10. metadata:
  11. labels:
  12. app: namespace-test-busybox
  13. spec:
  14. containers:
  15. - name: busybox
  16. image: busybox
  17. ports:
  18. - containerPort: 8000
  19. command:
  20. [
  21. "sh",
  22. "-c",
  23. "echo 'hello world' > index.html; busybox httpd -f -p 8000",
  24. ]
  25. readinessProbe:
  26. tcpSocket:
  27. port: 8000
  28. periodSeconds: 1
  29. ---
  30. apiVersion: v1
  31. kind: Service
  32. metadata:
  33. name: namespace-test-busybox
  34. spec:
  35. selector:
  36. app: namespace-test-busybox
  37. ports:
  38. - protocol: TCP
  39. port: 8000
  40. targetPort: 8000