Giter VIP home page Giter VIP logo

kube-node-init's Introduction

kube-node-init

kube-node-init is a Kubernetes daemonset for node initial configuration including:

  • Write files
  • Restart systemd services
  • Customize kernel parameters
  • Add Kubernetes node labels
  • Add Kubernetes node taints

Getting Started

$ helm repo add kube-node-init-charts https://raw.githubusercontent.com/mumoshu/kube-node-init/master/docs
$ helm install --name kube-node-init kube-node-init-charts/kube-node-init

This installs the followings to your nodes:

  • The init script
  • Kernel parameters

You can customze every aspect of kube-node-init via values.yaml. Please read the chart's README for more configuration options.

The init script

The default script does the following to improve your EKS nodes runnin Amazon Linux 2:

  • Installs a tweaked /etc/chrony.conf and then restarts chrony systemd service. The conf includes allow 127.0.0.1/32, so that Prometheus node-exporter's ntp-collector is able to connect the chronyd running on the node.

Customizing the init script

You can create your own values.yaml as follows to let kube-node-init use your own script:

values.yaml:

script: |
  echo your alternative, bespoke node init script here!

Run helm upgrade to let kube-node-init rerun with your script:

$ helm upgrade --name kube-node-init stable/kube-node-init --values values.yaml

Kernel parameters

kube-node-init also tweaks several kernel parameters listed under the sysctl.params key in the default values.yaml:

# default: 128
net.core.somaxconn: 65535
# default: 256
net.ipv4.tcp_max_syn_backlog: 65535
# dfault: 1000
net.core.netdev_max_backlog: 16384
# default: 32768 60999
net.ipv4.ip_local_port_range: 1024 65535
# default: 0
# enable(1) to optimize against short-lived sessions
net.ipv4.tcp_tw_reuse: 1
# default: 7200
net.ipv4.tcp_keepalive_time: 200
# default: 75
net.ipv4.tcp_keepalive_intvl: 60
# default: 9
net.ipv4.tcp_keepalive_probes: 3
# default: 6
net.ipv4.tcp_syn_retries: 5

In case you want to disable this feature, set --set sysctl.enabled=true while installing the chart.

kube-node-init's People

Contributors

mumoshu avatar at-k avatar mdaisuke avatar renjikari avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.