Skip to content

Commit b457976

Browse files
committed
feat(api/k8s): basic kubernetes setup for api
1 parent b46398e commit b457976

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

deployments/api.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: my-docker-fullstack-project-api-deployment
5+
spec:
6+
replicas: 1
7+
template:
8+
metadata:
9+
labels:
10+
app: my-docker-fullstack-project
11+
tier: api
12+
track: stable
13+
spec:
14+
containers:
15+
- name: my-docker-fullstack-project-api-container
16+
image: topheman/my-docker-fullstack-project_api_production:0.1.0
17+
ports:
18+
- name: golang # Can be referred in services
19+
containerPort: 5000 # Not hostPort (we only expose the container inside the pod)
20+
---
21+
apiVersion: v1
22+
kind: Service
23+
metadata:
24+
name: my-docker-fullstack-project-api-service
25+
spec:
26+
selector:
27+
app: my-docker-fullstack-project
28+
tier: api
29+
ports:
30+
- protocol: TCP
31+
port: 80
32+
targetPort: golang
33+
type: LoadBalancer

0 commit comments

Comments
 (0)