-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathapi.yml
36 lines (36 loc) · 953 Bytes
/
api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: docker-experiments-api-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: docker-experiments
tier: api
track: stable
spec:
containers:
- name: docker-experiments-api-container
image: topheman/docker-experiments_api_production:1.0.1
ports:
- name: golang # Can be referred in services
containerPort: 5000 # Not hostPort (we only expose the container inside the pod)
---
apiVersion: v1
kind: Service
metadata:
# named like the docker-compose service "api"
# so that nginx config stays same between docker-compose and kubernetes
name: api
spec:
selector:
app: docker-experiments
tier: api
ports:
- protocol: TCP
port: 5000
targetPort: golang
# default type (only exposed to the pods - not to the outside, like LoadBalancer)
type: ClusterIP