Skip to content

Instantly share code, notes, and snippets.

@yaasita
Created Feb 24, 2021
Embed
What would you like to do?
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: neg-demo-ing
namespace: default
annotations:
kubernetes.io/ingress.regional-static-ip-name: STATIC_IP_NAME
kubernetes.io/ingress.class: "gce-internal"
spec:
backend:
serviceName: nginx-svc
servicePort: 80
apiVersion: v1
kind: Service
metadata:
name: nginx-svc
annotations:
cloud.google.com/neg: '{"exposed_ports": {"80":{"name": "neg-name"}}}'
spec:
type: ClusterIP
selector:
app: nginx
ports:
- port: 80
protocol: TCP
targetPort: 80
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deploy
spec:
replicas: 6
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment