My app is running in google cloud platform(GCP) and containers are running inside kubernetes.
The problem: When cloud platform is down-scaling nodes, it kills nodes, where my one and only database and frontend pods are lying in.
Question: How to stop GCP killing nodes, where my only frontend and database pods are inside?
I figured out the problem by myself.
All my frontend, backend, database and redis containers were in the same nodepool. When i separeted them into different nodepools everything started working.
Creating node selector: adding into the end of backend-deployment.yaml nodeSelector: cloud.google.com/gke-nodepool: backend