100-Days-Of-DevOps-Challenge-KodeKloud

Set Resource Limits in Kubernetes Cluster

The Nautilus DevOps team has noticed performance issues in some Kubernetes-hosted applications due to resource constraints. To address this, they plan to set limits on resource utilization. Here are the details:

Note: The kubectl utility on jump_host is configured to operate with the Kubernetes cluster.

Steps

Let’s create pod.yaml file with with these contents. Our updated file will be look like this:

apiVersion: v1
kind: Pod
metadata:
    name: httpd-pod
    labels:
        app: httpd_pod
spec:
    containers:
        - name: httpd-container
          image: httpd:latest
          ports:
            - containerPort: 80
          resources:
            limits:
                cpu: 100m
                memory: 20Mi
            requests:
                cpu: 100m
                memory: 15Mi

Good to Know?

Resource Management

CPU Resources

Memory Resources

Resource Planning