mirror of
https://github.com/wardviaene/kubernetes-course.git
synced 2026-07-12 23:29:16 +00:00
healthchecks and secrets
This commit is contained in:
23
deployment/helloworld-healthcheck.yml
Normal file
23
deployment/helloworld-healthcheck.yml
Normal 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
|
||||
25
deployment/helloworld-secrets-volumes.yml
Normal file
25
deployment/helloworld-secrets-volumes.yml
Normal 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
|
||||
8
deployment/helloworld-secrets.yml
Normal file
8
deployment/helloworld-secrets.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: db-secrets
|
||||
type: Opaque
|
||||
data:
|
||||
password: cm9vdA==
|
||||
username: cGFzc3dvcmQ=
|
||||
Reference in New Issue
Block a user