Created
June 7, 2019 08:12
-
-
Save oioiben/48ea4407fa0443f34ac1b3bffc73f348 to your computer and use it in GitHub Desktop.
K8s resource types
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 # for versions before 1.9.0 use apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: go-test-app-deployment | |
spec: | |
selector: | |
matchLabels: | |
app: go-test-app | |
replicas: 2 # tells deployment to run 2 pods matching the template | |
template: | |
metadata: | |
labels: | |
app: go-test-app | |
spec: | |
containers: | |
- name: go-test-app | |
image: go-test-app | |
imagePullPolicy: IfNotPresent | |
ports: | |
- containerPort: 9090 | |
livenessProbe: | |
httpGet: | |
path: / | |
port: 9090 | |
initialDelaySeconds: 15 | |
timeoutSeconds: 1 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: go-test-app | |
spec: | |
selector: | |
app: go-test-app | |
type: ClusterIP | |
ports: | |
- name: http | |
port: 9090 | |
protocol: TCP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment