Skip to content

Instantly share code, notes, and snippets.

@mateobur
Created May 17, 2017 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mateobur/88cfe9d8e33b6895de22fd3f4d5cbbe5 to your computer and use it in GitHub Desktop.
Save mateobur/88cfe9d8e33b6895de22fd3f4d5cbbe5 to your computer and use it in GitHub Desktop.
nginx kubernetes rc
---
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx-wordpress
spec:
replicas: 5
selector:
app: nginx-wordpress
template:
metadata:
name: nginx-wordpress
labels:
app: nginx-wordpress
spec:
containers:
- name: nginx-wordpress
image: nginx
ports:
- name: http
containerPort: 80
volumeMounts:
- name: "config"
mountPath: "/etc/nginx/nginx.conf"
subPath: "nginx.conf"
volumes:
- name: "config"
configMap:
name: "nginxconfig"
---
apiVersion: v1
kind: Service
metadata:
labels:
name: nginx-wordpress
name: nginx-wordpress
spec:
type: LoadBalancer
selector:
app: nginx-wordpress
ports:
- name: http
port: 80
targetPort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment