Bootstrap FreeKB - OpenShift - Resolved "Error creating deployer pod"
OpenShift - Resolved "Error creating deployer pod"

Updated:   |  OpenShift articles

Let's say something like this is being returned.

5s          Warning   FailedCreate        deploymentconfig/my-app          Error creating deployer pod: pods "my-app-1-deploy" is forbidden: [minimum cpu usage per Pod is 1m.  No request is specified, minimum memory usage per Pod is 25Mi.  No request is specified, maximum cpu usage per Pod is 1m.  No limit is specified, maximum memory usage per Pod is 512Mi.  No limit is specified]

 

In this example, the deployment config may have resource limits, perhaps like this.

spec:
  template:
    spec:
      containers:
      - name: hello-openshift
        image: openshift/hello-openshift:latest
        resources:
          requests:
            cpu: 10m
            memory: 128Mi
          limits:
            cpu: 500m
            memory: 512Mi

 

Or you may have limits set, perhaps like this.

apiVersion: v1
kind: LimitRange
metadata:
  name: my-limits
spec:
  limits:
    - type: Pod
      max:
        cpu: 20m
        memory: 128Mi
      min:
        cpu: 200m
        memory: 512Mi

 

If you are setting the limits in your DeploymentConfig, specifying the resource CPU and Memory requests and limits under both strategy and containers in your YAML will probably resolve this issue because the deployer pod uses the strategy resources.

spec:
  strategy:
    resources:
      requests:
        cpu: 10m
        memory: 128Mi
      limits:
        cpu: 500m
        memory: 512Mi
  template:
    spec:
      containers:
      - name: hello-openshift
        image: openshift/hello-openshift:latest
        resources:
          requests:
            cpu: 10m
            memory: 128Mi
          limits:
            cpu: 500m
            memory: 512Mi

 

Or if you are using limits to set the min and max CPU and Memory for pods and containers in the project, having CPU and memory limits for both pods and containers should resolve this.

apiVersion: v1
kind: LimitRange
metadata:
  name: my-limits
spec:
  limits:
    - type: Pod
      max:
        cpu: 20m
        memory: 1Gi
      min:
        cpu: 200m
        memory: 6Mi
    - type: Container
      max:
        cpu: 2
        memory: 1Gi
      min:
        cpu: 100m
        memory: 4Mi

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter aa1b85 in the box below so that we can be sure you are a human.