nc-dply.yaml 577 B

12345678910111213141516171819202122232425262728293031323334353637
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: nc
  5. spec:
  6. replicas: 1
  7. selector:
  8. matchLabels:
  9. name: nc
  10. template:
  11. metadata:
  12. labels:
  13. name: nc
  14. spec:
  15. containers:
  16. - name: nc
  17. image: nginx
  18. imagePullPolicy: Always
  19. ports:
  20. - containerPort: 80
  21. name: tcp
  22. ---
  23. apiVersion: v1
  24. kind: Service
  25. metadata:
  26. name: nc
  27. spec:
  28. type: ClusterIP
  29. ipFamilyPolicy: PreferDualStack
  30. selector:
  31. name: nc
  32. ports:
  33. - protocol: TCP
  34. port: 8080
  35. targetPort: 80
  36. name: tcp