Skip to content

Instantly share code, notes, and snippets.

@ltearno
Created June 15, 2018 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ltearno/bd679c586382d619d9e9586d63072be9 to your computer and use it in GitHub Desktop.
Save ltearno/bd679c586382d619d9e9586d63072be9 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
spec:
# yeah we can deploy several instances of our JBoss application
replicas: 3
template:
spec:
containers:
- name: 'my-jboss-as-application'
image: my-jboss-as-application:latest
# don't forget probes please, maybe I will write an article on that topic...
livenessProbe:
httpGet:
path: /health
port: 8080
scheme: HTTP
readinessProbe:
failureThreshold: 3
httpGet:
path: /ready
port: 800
scheme: HTTP
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POSTGRES_DB_HOST
value: "127.0.0.1"
- name: DB_USER
valueFrom:
secretKeyRef:
name: db-user-credentials
key: username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-user-credentials
key: password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment