healthchecks and secrets

This commit is contained in:
Edward Viaene
2016-11-21 21:50:09 +01:00
parent 8378524f5e
commit 4d215ffb10
3 changed files with 56 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: db-secrets
type: Opaque
data:
password: cm9vdA==
username: cGFzc3dvcmQ=