Skip to content

Instantly share code, notes, and snippets.

@JulienBreux
Last active July 16, 2024 12:51
Show Gist options
  • Save JulienBreux/52403c9eb665b908ae7954e0f34d7763 to your computer and use it in GitHub Desktop.
Save JulienBreux/52403c9eb665b908ae7954e0f34d7763 to your computer and use it in GitHub Desktop.
🎈 Balloon pod

Balloon pod

Machine

  • Family t2d-standard-1 (πŸ”— Tau T2D machine types)
  • vCPU 1
  • Memory 4 GB
  • Maximum egress bandwidth (Gbps) 10

Useful commands

  • kubectl scale --replicas=4 deploy/nginx
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: balloon
spec:
replicas: 4
selector:
matchLabels:
pod: balloon-pod
template:
metadata:
labels:
pod: balloon-pod
spec:
priorityClassName: balloon-priority
terminationGracePeriodSeconds: 0
containers:
- name: ubuntu
image: ubuntu
command: ["sleep"]
args: ["infinity"]
resources:
limits:
cpu: 250m
ephemeral-storage: 1Gi
memory: 950M
requests:
cpu: 250m
ephemeral-storage: 1Gi
memory: 950M
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: balloon-priority
value: -10
preemptionPolicy: Never
globalDefault: false
description: "Balloon priority."
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: default-priority
value: 0
preemptionPolicy: PreemptLowerPriority
globalDefault: true
description: "Global default priority."
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 4
selector:
matchLabels:
pod: nginx-pod
template:
metadata:
labels:
pod: nginx-pod
spec:
priorityClassName: default-priority
terminationGracePeriodSeconds: 0
containers:
- name: nginx
image: nginx
resources:
limits:
cpu: 250m
ephemeral-storage: 1Gi
memory: 950M
requests:
cpu: 250m
ephemeral-storage: 1Gi
memory: 950M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment