Devs World
495 subscribers
182 photos
14 videos
419 links
All about software developing & architecture
@ml_world - the best materials about Machine Learning & Data Science

Our fund instagram to help homeless animals: https://www.instagram.com/ukraineanimalhelp/

Contacts: @anikishaev | creotiv@gmail.com
Download Telegram
Today we will talk on How to make real #zerodowntime in #Kubernetes during #deployment.

Many of you may think that Kubernetes will do it for you, that it already should do this. Yeah... should, but not doing.

There is an open issue on that, which still not fixed. Which lead to situation that during deployment some part of the requests will return connection error. What we of course don't want especially on #HiLoad projects where this can be critical problem.

But there is a simple #solution for that.

#ANDevHowTo #ANDevHowToKubernetes #k8s
👍21
🖥 Today in our #ANDevHowTo rubric we will start demystify how #Kubernetes #networking works and will emulate it with local #Linux tools. And in the end we will try to write our own CNI plugin for #K8S

Will start from the simple one - container to container connection on the same pod.

Also have small question: What command should be added to give ability to run request to the containers(pod) through the host ip 192.168.0.15?

Here is article:
https://github.com/creotiv/articles/blob/main/DevOps/K8S/Networking/package_routing_inside_the_k8s.md

#ANDevHowToNetworking #ANDevHowToKubernetes
🔥2❤‍🔥1
Proceeding on demystifying #Kubernetes #networking.

In previous post we described the scheme and network setup for many containers in one pod. In this one we will describe how to link pods on the same node

Basically we have the same setup like in previous post, as we just adding one more pod. But the crucial part is #iptables rules for routing packages from one #networknamespace to another connecting 2 #veth pairs.

Remember that by default Kubernetes use iptables over #IPVS. An on big clusters better to switch to the IPVS as it more faster. You can do this by modyfing #ConfigMap of #KubeProxy

Here is full article: https://github.com/creotiv/articles/blob/main/DevOps/K8S/Networking/package_routing_inside_the_k8s.md

In the next post we will connect containers on different nodes. Stay in touch.

And don't forget to support my work with like

#ANDevHowTo #ANDevHowToKubernetes #ANDevHowToNetworking
🔥2
Proceeding on demystifying #Kubernetes #networking.

In previous post we described the scheme and network setup for container to container communication in 2 different pods on the same node. In this one we will describe how to link pods and containers on different nodes

Basically we have the same setup like in previous post, as we just adding one more node. But we additionally added bridge ip and routing pod<->bridge<->interface<->additional nodes

Here is full article: https://github.com/creotiv/articles/blob/main/DevOps/K8S/Networking/package_routing_inside_the_k8s.md

In the next post we will connect containers on different nodes using #K8S #Service. Stay in touch.

And don't forget to support my work with like

#ANDevHowTo #ANDevHowToKubernetes #ANDevHowToNetworking
👍3
In today lecture at the #ANDevHowTo we will learn how to update configuration of our applications without redeploying it in #Kubernetes.

Why this can be needed if we just can redeploy?
1. Redeploy is taking much longer time then just config updates.
2. In HL projects redeploy may create additional load spikes, which we don't want to happen
3. Even with a graceful shutdown & preStop hook timeouts there is a chance that some of the requests can be broken.
4. It's much more complicated process, and thus it creates more risks. Because even good architected systems sometimes failing due to strange reasons.

How we can achieve this:
1. Use ConfigMap to store your configuration
2. Create config reload mechanism inside your application
3. Send signal to your services when configuration got changed.
3.1 You can use File Watcher inside the application (Simplest way)
3.2 You can send SIGHUP signal after you update configs (Manual way)
3.3 You can write a plugin that will watch for the config changes and will notify service with a signal(SIGHUP, http port/endpoint, etc)

#ANDevHowToKubernetes #K8S #Hiload #hl #highload