docker laten werken hiermee is zo moeilijk

This commit is contained in:
2020-02-19 14:03:23 +01:00
parent 55256be959
commit c435a2a18c
5 changed files with 43 additions and 38 deletions

View File

@@ -1,41 +1,15 @@
---
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
server: "http"
expose: "true"
spec:
containers:
- name: front-end
image: IMAGE-A
image: beppev/server-a:latest
ports:
- containerPort: 5000
---
@@ -44,11 +18,38 @@ kind: Pod
metadata:
name: server-b
labels:
server: http
server: "http"
spec:
containers:
- name: front-end
image: IMAGE-B
image: beppev/server-b:latest
ports:
- containerPort: 5000
---
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:
type: NodePort
selector:
expose: "true"
ports:
- name: http
protocol: TCP
targetPort: 5000
port: 5000
nodePort: 30036