Skip to content

Instantly share code, notes, and snippets.

@kmassada
Last active October 29, 2018 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmassada/ad766d49e2616d9f8d1cc44285bcab56 to your computer and use it in GitHub Desktop.
Save kmassada/ad766d49e2616d9f8d1cc44285bcab56 to your computer and use it in GitHub Desktop.
Try out fanout ingress service service in GKE
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
---
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: httpd-deployment
labels:
app: httpd
spec:
replicas: 3
selector:
matchLabels:
app: httpd
template:
metadata:
labels:
app: httpd
spec:
containers:
- name: httpd
image: httpd
ports:
- containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
name: nginx-service
spec:
type: NodePort
selector:
app: nginx
ports:
- protocol: TCP
port: 80
protocol: TCP
name: http
---
kind: Service
apiVersion: v1
metadata:
name: httpd-service
spec:
type: NodePort
selector:
app: httpd
ports:
- protocol: TCP
port: 80
protocol: TCP
name: http
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: fanout-ingress-gce
spec:
rules:
- http:
paths:
- path: /*
backend:
serviceName: nginx-service
servicePort: 80
- path: /echo/*
backend:
serviceName: httpd-service
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment