Skip to main content

Running K8s cluster service kubelet with Swap Memory Enabled

For enabling swap memory check the below link :

https://jinojoseph.blogspot.com/2019/10/enable-swap-memory-using-swapfile-in.html


# sudo vi /etc/systemd/system/kubelet.service.d/10-kubeadm.conf

Add the KUBELET_EXTRA_ARGS line as below:
----------------------------------------

Environment="KUBELET_EXTRA_ARGS=--fail-swap-on=false"
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS


Now kubelet.service changed on disk. Run 'systemctl daemon-reload' to reload units

# sudo systemctl daemon-reload
# sudo systemctl restart kubelet
# sudo systemctl status kubelet

That is all cheers :p

Comments

Popular posts from this blog

K8s External Secrets integration between AWS EKS and Secrets Manager(SM) using IAM Role.

What is K8s External Secrets and how it will make your life easier? Before explaning about External Secrets we will first look into the k8s secrets and how it will work. In k8s secrets we will create key value pairs of the secrets and set this as either pod env variables or mount them as volumes to pods. For more details about k8s secrets you can check my blog http://jinojoseph.blogspot.com/2020/08/k8s-secrets-explained.html   So in this case if developers wants to change the ENV variables , then we have to edit the k8s manifest yaml file, then we have to apply the new files to the deployment. This is a tiresome process and also chances of applying to the wrong context is high if you have multiple k8s clusters for dev / stage and Prod deployments. So in-order to make this easy , we can add all the secrets that is needed in the deployment, in the AWS Secret Manager and with the help of External secrets we can fetch and create those secrets in the k8s cluster. So what is K8s external...

ELK Stack with Filebeat using Docker Containers

ubuntu@master:~$ git clone https://github.com/deviantony/docker-elk.git ubuntu@master:~$ cd docker-elk ubuntu@master:~/docker-elk$ sudo docker-compose up -d Creating dockerelk_elasticsearch_1 ... done WARNING: Image for service kibana was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`. Creating dockerelk_elasticsearch_1 ... Creating dockerelk_logstash_1      ... done Creating dockerelk_kibana_1        ... done ubuntu@master:~/docker-elk$ sudo docker-compose ps           Name                         Command               State                                   Ports                      ...

Certbot install in AWS EC2 instance Amazon machine image for HA Proxy LB Server

If you try to install certbot you will get a message like below in Amazon machine image EC2 instance. ------------------------------------------------------------ Sorry, I don't know how to bootstrap Certbot on your operating system! You will need to install OS dependencies, configure virtualenv, and run pip install manually. Please see https://letsencrypt.readthedocs.org/en/latest/contributing.html#prerequisites ------------------------------------------------------------ Fix: ###  Amazon Linux 2 doesn't have  epel-release  in its repositories, but I've found you can install the EPEL RPM package itself, and then you'll be able to install  certbot  or  certbot-nginx  from there. Download the RPM curl -O http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm Then install it sudo yum install epel-release-latest-7.noarch.rpm Now you can install certbot sudo yum install certbot And then run it as usual sudo certb...