Hello app ingress

Kubernetes ingress resource for GKE Hello app.

Explore further

For detailed documentation that includes this code sample, see the following:

Code sample

YAML

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: helloweb
  annotations:
    kubernetes.io/ingress.global-static-ip-name: helloweb-ip
  labels:
    app: hello
spec:
  defaultBackend:
    service:
      name: helloweb-backend
      port:
        number: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: helloweb-backend
  labels:
    app: hello
spec:
  type: NodePort
  selector:
    app: hello
    tier: web
  ports:
  - port: 8080
    targetPort: 8080

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.