Skip to content

Commit

Permalink
healthchecks and secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Nov 21, 2016
1 parent 8378524 commit 4d215ff
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
23 changes: 23 additions & 0 deletions deployment/helloworld-healthcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: helloworld-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: helloworld
spec:
containers:
- name: k8s-demo
image: wardviaene/k8s-demo
ports:
- name: nodejs-port
containerPort: 3000
livenessProbe:
httpGet:
path: /
port: nodejs-port
initialDelaySeconds: 15
timeoutSeconds: 30
25 changes: 25 additions & 0 deletions deployment/helloworld-secrets-volumes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: helloworld-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: helloworld
spec:
containers:
- name: k8s-demo
image: wardviaene/k8s-demo
ports:
- name: nodejs-port
containerPort: 3000
volumeMounts:
- name: cred-volume
mountPath: /etc/creds
readOnly: true
volumes:
- name: cred-volume
secret:
secretName: db-secrets
8 changes: 8 additions & 0 deletions deployment/helloworld-secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: db-secrets
type: Opaque
data:
password: cm9vdA==
username: cGFzc3dvcmQ=

0 comments on commit 4d215ff

Please sign in to comment.