Why I am getting AKS security recomendation even I have definied in deployment YAML: Container CPU and memory limits should be enforced

Mohammad Ajmal Yazdani 391 Reputation points
2021-08-21T13:51:18.783+00:00

I am running a deployment in AKS cluster and below is my YAML where I have clearly defined cpu/memory request and limit. Question is why I am getting AKS security recommendation : Container CPU and memory limits should be enforced ?

125187-capture.png

apiVersion: apps/v1
kind: Deployment
metadata:
name: azure-vote-back
namespace: my-dev
spec:
replicas: 1
selector:
matchLabels:
app: azure-vote-back
template:
metadata:
labels:
app: azure-vote-back
spec:
containers:
- name: azure-vote-back
image: redis
resources:
requests:
cpu: 125m
memory: 256Mi
limits:
cpu: 100m
memory: 128Mi
ports:
- containerPort: 6379
name: redis

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,081 questions
{count} votes

Accepted answer
  1. Mohammad Ajmal Yazdani 391 Reputation points
    2021-08-25T04:08:34.317+00:00

    @Mohammad Ajmal Yazdani . Thanks for the help. I was missing unit while updating Policy Assignment Parameters values . This is the correct way to do it and we need to pass unit as well (Mi or Gi for memory & m for cpu) and it's should be greater than or equal to YAML definition.

    126233-capture.png


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.