Last active
June 4, 2021 14:32
-
-
Save garystafford/0d700a1393386f15448d26803a8f8cd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: service-h | |
labels: | |
app: service-h | |
component: service | |
spec: | |
ports: | |
- name: http | |
port: 8080 | |
selector: | |
app: service-h | |
component: service | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: service-h | |
labels: | |
app: service-h | |
component: service | |
version: v1 | |
spec: | |
replicas: 3 | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxSurge: 2 | |
maxUnavailable: 1 | |
selector: | |
matchLabels: | |
app: service-h | |
component: service | |
version: v1 | |
template: | |
metadata: | |
labels: | |
app: service-h | |
component: service | |
version: v1 | |
spec: | |
containers: | |
- name: service-h | |
image: registry.hub.docker.com/garystafford/go-srv-h:1.6.8 | |
livenessProbe: | |
httpGet: | |
path: /api/health | |
port: 8080 | |
initialDelaySeconds: 3 | |
periodSeconds: 3 | |
env: | |
- name: LOG_LEVEL | |
value: info | |
- name: MONGO_CONN | |
valueFrom: | |
secretKeyRef: | |
name: go-srv-config | |
key: mongodb.conn | |
- name: GREETING | |
value: "Nǐ hǎo (你好), from Service H!" | |
ports: | |
- containerPort: 8080 | |
imagePullPolicy: Always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment