GCP is killing nodes, where my one and only frontend and database pods are lying in

8/18/2016

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?

-- jaanus
autoscaling
gcp
google-cloud-platform
kubernetes

1 Answer

8/22/2016

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

More info: https://github.com/kubernetes/kubernetes.github.io/blob/release-1.3/docs/user-guide/node-selection/index.md

-- jaanus
Source: StackOverflow