Last active
June 29, 2022 10:40
-
-
Save shameekagarwal/1883a95d8be0a74030b77966d80196a0 to your computer and use it in GitHub Desktop.
Service
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: apps/v1 | |
kind: ReplicaSet | |
metadata: | |
name: api | |
spec: | |
selector: | |
matchLabels: | |
name: api | |
replicas: 3 | |
template: | |
metadata: | |
labels: | |
name: api | |
spec: | |
containers: | |
- name: api | |
image: user-service | |
env: | |
- name: DB | |
value: db | |
livenessProbe: &healthcheck | |
httpGet: | |
path: /demo/hello | |
port: 8080 | |
readinessProbe: | |
<<: *healthcheck | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: api | |
spec: | |
type: NodePort | |
selector: | |
name: api | |
ports: | |
- port: 8080 |
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: apps/v1 | |
kind: ReplicaSet | |
metadata: | |
name: db | |
spec: | |
selector: | |
matchLabels: | |
name: db | |
template: | |
metadata: | |
labels: | |
name: db | |
spec: | |
containers: | |
- name: db | |
image: mongo:3.3 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: db | |
spec: | |
selector: | |
name: db | |
ports: | |
- port: 27017 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment