Skip to content

Commit

Permalink
Add Kubernetes manifest files
Browse files Browse the repository at this point in the history
  • Loading branch information
Daan van Marsbergen committed Feb 3, 2021
1 parent 32e1b55 commit a98f350
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
25 changes: 25 additions & 0 deletions config/kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: daanvm-nl
spec:
selector:
matchLabels:
app: daanvm-nl
replicas: 2
template:
metadata:
labels:
app: daanvm-nl
spec:
containers:
- name: daanvm-nl-nginx
image: daanvm/daanvm.nl:latest
ports:
- containerPort: 80
lifecycle:
preStop:
exec:
# Gracefully shutdown nginx
command: ["/bin/bash", "-c", "/bin/sleep5 && /usr/sbin/nginx -s quit"]
13 changes: 13 additions & 0 deletions config/kubernetes/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: daanvm-nl
spec:
type: LoadBalancer
selector:
app: daanvm-nl
ports:
- port: 80
targetPort: 80
protocol: TCP

0 comments on commit a98f350

Please sign in to comment.