Hot opensource news

Openshift 3 : My node can’t spaw more than 40 pods, why ?

If you deploy a lot of pods on each nodes, you might faced to an ressource error. Openshift 3 have a limits set on how many pods can be run on a node by default ?

The answer is yes, by default the limits is 40 pods per node. It can be to low for some usage so i recommend you to increase to 100.

How can i increase the limit ?

On each nodes you have to edit node-config.yaml and add the kubeletArguments section with thoses params :

     - "100"

and of course restart your openshift-node service.

It is possible to use ansible for that

#Update max-pods in node-config.yaml max-pods 100
- name: Add kubeletArguments section in node-config.yaml
    dest: /etc/openshift/node/node-config.yaml
    line: 'kubeletArguments:'
         - openshift-node

- name: Add max-pods in node-config.yaml
    dest: /etc/openshift/node/node-config.yaml
    regexp: "{{ item.regexp }}"
    line: "{{ item.line }}"
    insertafter: "{{ item.insertafter }}"
       - { line: "  max-pods:",    regexp: '^  max-pods:$',   insertafter: "^kubeletArguments:$"}
       - { line: "     - \"100\"", regexp: '     - "[0-9]+"', insertafter: "^  max-pods:$"}
         - openshift-node
        - restart openshift-node
ansible task
- name: restart openshift-node
  service: name=openshift-node state=restarted
ansible handler
talset on Githubtalset on Linkedin

, , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *