apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: cubanews-ingress
  annotations:
    networking.gke.io/managed-certificates: managed-cert
    kubernetes.io/ingress.class: "gce"
    kubernetes.io/ingress.global-static-ip-name: cubanews-ip
  labels:
    project: cubanews
spec:
  rules:
    - http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: cubanews-web-service
              port:
                number: 80
        - path: /api
          pathType: Prefix
          backend:
            service:
              name: cubanews-rest-api-service
              port:
                number: 8080