Cloud native Kubernetes series | The role of init container to initialize the container
kubernetes 1.3
This version introduces init container
the initialization container feature. It is mainly used to start one or more initialization containers before starting the application container (app container), as a basis for the application container. It will only init container
function normally if it app container
runs normally.
init container
The initialization container is started before other containers in the Pod. init container
The main function of the initialization container is to perform some initialization tasks before the main container starts. These tasks can include configuration file preparation, data preprocessing, network setup, etc.
Use case 1: vm.swappiness=35
The app container needs to be run in the kubernetes node:
currently vm.swappiness
the value of each kubernetes node is the default value 30
[root@k8s-master ~]# sysctl -a | grep vm.swap