Last active
April 18, 2024 13:37
-
-
Save yogeek/996dcbcdad88f6404188b6dc5a5fc399 to your computer and use it in GitHub Desktop.
K8s useful resources
This file contains hidden or 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: nginx | |
spec: | |
selector: | |
matchLabels: | |
app: nginx | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
# nodeName: toto | |
containers: | |
- name: nginx | |
image: yogeek/pinginx | |
resources: | |
requests: | |
memory: "32Mi" | |
cpu: "100m" | |
limits: | |
memory: "128Mi" | |
cpu: "500m" | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx | |
spec: | |
selector: | |
app: nginx | |
ports: | |
- name: http | |
port: 8080 | |
protocol : TCP | |
targetPort: 80 |
This file contains hidden or 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: pause-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: pause-app | |
template: | |
metadata: | |
labels: | |
app: pause-app | |
spec: | |
containers: | |
- name: pause-container | |
image: k8s.gcr.io/pause:3.4.1 | |
resources: | |
limits: | |
memory: 20Mi | |
requests: | |
cpu: '10m' | |
memory: 10Mi | |
nodeSelector: | |
node_group: <NODE_GROUP> | |
tolerations: | |
- effect: NoSchedule | |
key: node_group | |
operator: Equal | |
value: <NODE_GROUP> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment