Files
cicdTest/deploy.yaml
2020-02-27 11:07:34 +01:00

86 lines
1.3 KiB
YAML

---
apiVersion: v1
kind: Pod
metadata:
name: server-a
labels:
server: "http"
expose: "true"
spec:
containers:
- name: front-end
image: beppev/server-a:latest
ports:
- containerPort: 5000
---
apiVersion: v1
kind: Pod
metadata:
name: server-b
labels:
server: "http"
app: "ja"
version: v1
spec:
containers:
- name: front-end
image: beppev/server-b:latest
ports:
- containerPort: 6000
---
apiVersion: v1
kind: Pod
metadata:
name: server-c
labels:
server: "http"
app: "ja"
version: v2
spec:
containers:
- name: front-end
image: beppev/server-c:latest
ports:
- containerPort: 6000
---
apiVersion: v1
kind: Service
metedata:
name: server-b-c-service
spec:
selector:
app: "ja"
ports:
- name: http
protocol: TCP
port: 6000
---
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
---
kind: Service
apiVersion: v1
metadata:
name: example-loadbalancer
spec:
selector:
expose: "true"
ports:
- name: http
protocol: TCP
targetPort: 5000
port: 80
type: LoadBalancer