readme.fr

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 :

kubeletArguments:
  max-pods:
     - "100"
/etc/openshift/node/node-config.yaml

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
  lineinfile:
    dest: /etc/openshift/node/node-config.yaml
    line: 'kubeletArguments:'
  tags:
         - openshift-node

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

, , , , ,

Leave a Reply

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