svc.yaml 375 B

123456789101112131415161718192021
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: hostname
  5. annotations:
  6. cloud.google.com/neg: '{"ingress":true,"exposed_ports":{"80":{},"443":{}}}'
  7. spec:
  8. ports:
  9. - port: 80
  10. name: host1
  11. protocol: TCP
  12. targetPort: 8000
  13. - port: 443
  14. name: host2
  15. protocol: TCP
  16. targetPort: 8080
  17. selector:
  18. run: hostname
  19. sessionAffinity: None
  20. type: ClusterIP