metallb_mainvip.yaml 482 B

123456789101112131415161718192021
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: ingress
  5. namespace: ingress
  6. spec:
  7. selector:
  8. name: nginx-ingress-microk8s
  9. type: LoadBalancer
  10. # loadBalancerIP is optiojal. MetalLB will automatically allocate an IP
  11. # from its pool if not specified. You can also specify one manually.
  12. loadBalancerIP: 10.42.42.30
  13. ports:
  14. - name: http
  15. protocol: TCP
  16. port: 80
  17. targetPort: 80
  18. - name: https
  19. protocol: TCP
  20. port: 443
  21. targetPort: 443