Skip to content

Instantly share code, notes, and snippets.

@JulienBreux
Last active July 16, 2024 12:51
Show Gist options
  • Select an option

  • Save JulienBreux/52403c9eb665b908ae7954e0f34d7763 to your computer and use it in GitHub Desktop.

Select an option

Save JulienBreux/52403c9eb665b908ae7954e0f34d7763 to your computer and use it in GitHub Desktop.

Revisions

  1. JulienBreux revised this gist Jul 16, 2024. 3 changed files with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    ### Machine

    - Family `t2d-standard-1`
    - Family `t2d-standard-1` (🔗 [Tau T2D machine types](https://cloud.google.com/compute/docs/general-purpose-machines#t2d_machine_types))
    - vCPU `1`
    - Memory `4 GB`
    - Maximum egress bandwidth (Gbps) `10`
    File renamed without changes.
    File renamed without changes.
  2. JulienBreux revised this gist Jul 16, 2024. 3 changed files with 5 additions and 38 deletions.
    4 changes: 4 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -6,3 +6,7 @@
    - vCPU `1`
    - Memory `4 GB`
    - Maximum egress bandwidth (Gbps) `10`

    ### Useful commands

    - `kubectl scale --replicas=4 deploy/nginx`
    2 changes: 1 addition & 1 deletion nginx.Deployment.yaml
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ kind: Deployment
    metadata:
    name: nginx
    spec:
    replicas: 2
    replicas: 4
    selector:
    matchLabels:
    pod: nginx-pod
    37 changes: 0 additions & 37 deletions tmp.capacity.md
    Original file line number Diff line number Diff line change
    @@ -1,37 +0,0 @@
    # First node

    ```
    Capacity:
    cpu: 1
    ephemeral-storage: 98831908Ki
    hugepages-1Gi: 0
    hugepages-2Mi: 0
    memory: 4018368Ki
    pods: 110
    Allocatable:
    cpu: 940m
    ephemeral-storage: 47060071478
    hugepages-1Gi: 0
    hugepages-2Mi: 0
    memory: 2872512Ki
    pods: 110
    ```

    # Second node

    ```
    Capacity:
    cpu: 1
    ephemeral-storage: 98831908Ki
    hugepages-1Gi: 0
    hugepages-2Mi: 0
    memory: 4018368Ki
    pods: 110
    Allocatable:
    cpu: 940m
    ephemeral-storage: 47060071478
    hugepages-1Gi: 0
    hugepages-2Mi: 0
    memory: 2872512Ki
    pods: 110
    ```
  3. JulienBreux revised this gist Jul 16, 2024. 2 changed files with 16 additions and 12 deletions.
    14 changes: 8 additions & 6 deletions balloon.Deployment.yaml
    Original file line number Diff line number Diff line change
    @@ -21,9 +21,11 @@ spec:
    command: ["sleep"]
    args: ["infinity"]
    resources:
    requests:
    cpu: 200m
    memory: 950M
    limits:
    cpu: 200m
    memory: 950M
    limits:
    cpu: 250m
    ephemeral-storage: 1Gi
    memory: 950M
    requests:
    cpu: 250m
    ephemeral-storage: 1Gi
    memory: 950M
    14 changes: 8 additions & 6 deletions nginx.Deployment.yaml
    Original file line number Diff line number Diff line change
    @@ -19,9 +19,11 @@ spec:
    - name: nginx
    image: nginx
    resources:
    requests:
    cpu: 200m
    memory: 950M
    limits:
    cpu: 200m
    memory: 950M
    limits:
    cpu: 250m
    ephemeral-storage: 1Gi
    memory: 950M
    requests:
    cpu: 250m
    ephemeral-storage: 1Gi
    memory: 950M
  4. JulienBreux revised this gist Jul 16, 2024. 2 changed files with 6 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions balloon.Deployment.yaml
    Original file line number Diff line number Diff line change
    @@ -22,5 +22,8 @@ spec:
    args: ["infinity"]
    resources:
    requests:
    cpu: 200m
    memory: 950M
    limits:
    cpu: 200m
    memory: 950M
    3 changes: 3 additions & 0 deletions nginx.Deployment.yaml
    Original file line number Diff line number Diff line change
    @@ -20,5 +20,8 @@ spec:
    image: nginx
    resources:
    requests:
    cpu: 200m
    memory: 950M
    limits:
    cpu: 200m
    memory: 950M
  5. JulienBreux revised this gist Jul 16, 2024. No changes.
  6. JulienBreux revised this gist Jul 16, 2024. 2 changed files with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Baloon pod
    # Balloon pod

    ### Machine

    File renamed without changes.
  7. JulienBreux revised this gist Jul 16, 2024. 1 changed file with 24 additions and 0 deletions.
    24 changes: 24 additions & 0 deletions nginx.Deployment.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: nginx
    spec:
    replicas: 2
    selector:
    matchLabels:
    pod: nginx-pod
    template:
    metadata:
    labels:
    pod: nginx-pod
    spec:
    priorityClassName: default-priority
    terminationGracePeriodSeconds: 0
    containers:
    - name: nginx
    image: nginx
    resources:
    requests:
    cpu: 200m
    memory: 950M
  8. JulienBreux created this gist Jul 16, 2024.
    8 changes: 8 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # Baloon pod

    ### Machine

    - Family `t2d-standard-1`
    - vCPU `1`
    - Memory `4 GB`
    - Maximum egress bandwidth (Gbps) `10`
    9 changes: 9 additions & 0 deletions ballon.priorityClass.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    ---
    apiVersion: scheduling.k8s.io/v1
    kind: PriorityClass
    metadata:
    name: balloon-priority
    value: -10
    preemptionPolicy: Never
    globalDefault: false
    description: "Balloon priority."
    26 changes: 26 additions & 0 deletions balloon.Deployment.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    ---
    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:
    requests:
    cpu: 200m
    memory: 950M
    9 changes: 9 additions & 0 deletions default.priorityClass.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    ---
    apiVersion: scheduling.k8s.io/v1
    kind: PriorityClass
    metadata:
    name: default-priority
    value: 0
    preemptionPolicy: PreemptLowerPriority
    globalDefault: true
    description: "Global default priority."
    37 changes: 37 additions & 0 deletions tmp.capacity.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    # First node

    ```
    Capacity:
    cpu: 1
    ephemeral-storage: 98831908Ki
    hugepages-1Gi: 0
    hugepages-2Mi: 0
    memory: 4018368Ki
    pods: 110
    Allocatable:
    cpu: 940m
    ephemeral-storage: 47060071478
    hugepages-1Gi: 0
    hugepages-2Mi: 0
    memory: 2872512Ki
    pods: 110
    ```

    # Second node

    ```
    Capacity:
    cpu: 1
    ephemeral-storage: 98831908Ki
    hugepages-1Gi: 0
    hugepages-2Mi: 0
    memory: 4018368Ki
    pods: 110
    Allocatable:
    cpu: 940m
    ephemeral-storage: 47060071478
    hugepages-1Gi: 0
    hugepages-2Mi: 0
    memory: 2872512Ki
    pods: 110
    ```