Instantly share code, notes, and snippets.

Embed
What would you like to do?
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
spec:
replicas: 1
selector:
app: nginx
template:
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
- name: nginx
image: rusher81572/nginx
ports:
- containerPort: 80
- containerPort: 443
---
apiVersion: v1
kind: ReplicationController
metadata:
name: phpfpm
spec:
replicas: 1
selector:
app: phpfpm
template:
metadata:
name: phpfpm
labels:
app: phpfpm
spec:
containers:
- name: phpfpm
image: rusher81572/phpfpm
ports:
- containerPort: 9001
---
apiVersion: v1
kind: ReplicationController
metadata:
name: mysql
spec:
replicas: 1
selector:
app: mysql
template:
metadata:
name: mysql
labels:
app: mysql
spec:
containers:
- name: mysql
image: rusher81572/mysql
ports:
- containerPort: 3306
---
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
ports:
- port: 80
targetPort: 80
nodePort: 32400
protocol: TCP
type: LoadBalancer
selector:
app: nginx
---
apiVersion: v1
kind: Service
metadata:
name: mysql
spec:
ports:
- port: 3306
targetPort: 3306
protocol: TCP
type: LoadBalancer
selector:
app: mysql
---
apiVersion: v1
kind: Service
metadata:
name: phpfpm
spec:
ports:
- port: 9001
targetPort: 9001
protocol: TCP
type: LoadBalancer
selector:
app: phpfpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment