Skip to content

Instantly share code, notes, and snippets.

@wallnerryan
Last active December 15, 2015 20:27
Show Gist options
  • Select an option

  • Save wallnerryan/e92ef5a138229577237e to your computer and use it in GitHub Desktop.

Select an option

Save wallnerryan/e92ef5a138229577237e to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Service
metadata:
name: flocker-web
labels:
app: flocker-web
spec:
ports:
# the port that this service should serve on
- port: 80
selector:
app: flocker-web
---
apiVersion: v1
kind: ReplicationController
metadata:
name: flocker-web
# these labels can be applied automatically
# from the labels in the pod template if not set
labels:
purpose: testing
spec:
replicas: 1
template:
metadata:
labels:
app: flocker-web
spec:
containers:
- name: flocker-web
image: nginx
env:
- name: GET_HOSTS_FROM
value: dns
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
# name must match the volume name below
- name: www-root
mountPath: "/usr/share/nginx/html"
volumes:
- name: www-root
flocker:
datasetName: FlockerVolume1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment