This commit is contained in:
2020-02-18 12:55:03 +01:00
parent e64a0f080e
commit 8a75cef351
11 changed files with 310 additions and 4 deletions

View File

@@ -0,0 +1,54 @@
---
kind: service
apiVersion: v1
metadata:
name: server-check
spec:
selector:
server: http
ports:
- name: http
protocol: TCP
port: 5000
---
kind: service
apiVersion: v1
metadata:
name: expose-server
spec:
selector:
expose: true
ports:
- name: http
protocol: TCP
targetPort: 5000
port: 5000
nodePort: 30036
---
apiVersion: v1
kind: Pod
metadata:
name: server-a
labels:
server: http
expose: true
spec:
containers:
- name: front-end
image: IMAGE-A
ports:
- containerPort: 5000
---
apiVersion: v1
kind: Pod
metadata:
name: server-b
labels:
server: http
spec:
containers:
- name: front-end
image: IMAGE-B
ports:
- containerPort: 5000