Question

When I am creating a container if I don't specify any cpu or memory resources is there a default setting that DO sets of those containers?

Posted January 27, 2020 441 views
DigitalOcean Managed Kubernetes

When I am creating a container if I don’t specify any cpu or memory resources is there a default setting that DO sets of those containers? Im fairly new to k8s so im not sure how to look this up with kubectl.

Thank,

Chris

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

The default, I don’t know, but I can tell you this:

If you want to find out the resource limit / request then you can see the value by describing the deployment / pod, for example: kubectl describe deployment ping or kubectl describe pod ping. You will see something like this:

spec:
  containers:
    resources:
      limits:
        cpu: 300m
        memory: 128Mi

You can read more about resource limiting on kubernetes.io

Submit an Answer