Skip to content

Instantly share code, notes, and snippets.

@bprashanth
Created July 6, 2016 22:36
Show Gist options
  • Save bprashanth/233794af4889de7ac4d490bf7b4e35ac to your computer and use it in GitHub Desktop.
Save bprashanth/233794af4889de7ac4d490bf7b4e35ac to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Service
metadata:
name: echoheaders
labels:
app: echoheaders
spec:
type: NodePort
ports:
- port: 80
targetPort: 8080
protocol: TCP
name: http
selector:
app: echoheaders
---
apiVersion: v1
kind: ReplicationController
metadata:
name: echoheaders
spec:
replicas: 1
template:
metadata:
labels:
app: echoheaders
spec:
containers:
- name: echoheaders
image: gcr.io/google_containers/echoserver:1.4
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
app: nginx
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
selector:
app: nginx
---
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
spec:
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: gcr.io/google_containers/nginx-slim:0.8
ports:
- containerPort: 80
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: echoserver
spec:
rules:
- host: foo.com
http:
paths:
- backend:
serviceName: echoserver
servicePort: 80
path: /*
- backend:
serviceName: nginx
servicePort: 80
path: /.well-known/acme-challenge/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment