You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
462 B

  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: nginx-service
  5. namespace: web-test
  6. spec:
  7. type: NodePort
  8. selector:
  9. app: nginx-deployment
  10. ports:
  11. # By default and for convenience, the `targetPort` is set to the same value as the `port` field.
  12. - port: 80
  13. targetPort: 80
  14. # Optional field
  15. # By default and for convenience, the Kubernetes control plane will allocate a port from a range (default: 30000-32767)
  16. nodePort: 30007