pod-namespace-selector.yml 692 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. apiVersion: v1
  2. kind: Namespace
  3. metadata:
  4. name: appns
  5. ---
  6. apiVersion: apps/v1
  7. kind: Deployment
  8. metadata:
  9. labels:
  10. app: nginx
  11. name: nginx
  12. namespace: appns
  13. spec:
  14. replicas: 2
  15. selector:
  16. matchLabels:
  17. app: nginx
  18. template:
  19. metadata:
  20. labels:
  21. app: nginx
  22. spec:
  23. containers:
  24. - image: nginx
  25. name: nginx
  26. ---
  27. apiVersion: chaos-mesh.org/v1alpha1
  28. kind: Schedule
  29. metadata:
  30. name: pod-kill-example
  31. namespace: chaos-mesh
  32. spec:
  33. schedule: '@every 1m'
  34. historyLimit: 2
  35. concurrencyPolicy: 'Forbid'
  36. type: 'PodChaos'
  37. podChaos:
  38. #action: pod-kill
  39. action: pod-failure
  40. mode: one
  41. selector:
  42. namespaces:
  43. - appns