Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.