Last active
April 23, 2023 21:31
-
-
Save martinezhenry/a6ac2f80a4ad9f3137f479d98be4bb45 to your computer and use it in GitHub Desktop.
K8s resources example
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: Deployment | |
metadata: | |
name: hello-world-deployment | |
labels: | |
app: hello-world | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: hello-world | |
template: | |
metadata: | |
labels: | |
app: hello-world | |
spec: | |
containers: | |
- name: hello-world | |
image: hello-world | |
imagePullPolicy: IfNotPresent | |
resources: | |
requests: | |
memory: "128Mi" | |
cpu: "100m" | |
limits: | |
memory: "256Mi" | |
cpu: "200m" | |
ports: | |
- containerPort: 80 | |
env: | |
- name: "ENV_SCOPE" | |
value: "lab" |
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: hello-world-service | |
spec: | |
type: ClusterIP | |
selector: | |
app.kubernetes.io/name: hello-world-deployment | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment