In GCP Kubernetes (GKE) how do I assign a stateless pod created by a deployment to a provisioned vm

1/16/2018

I have several operational deployments on minikube locally and am trying to deploy them on GCP with kubernetes.

When I describe a pod created by a deployment (which created a replication set that spawned the pod):

kubectl get po redis-sentinel-2953931510-0ngjx -o yaml

It indicates it landed on one of the kubernetes vms.

I'm having trouble with deployments that work separately failing due to lack of resources e.g. cpu even though I provisioned a VM above the requirements. I suspect the cluster is placing the pods on it's own nodes and running out of resources.

How should I proceed?

Do I introduce a vm to be orchestrated by kubernetes? Do I enlarge the kubernetes nodes? Or something else all together?

-- Rubber Duck
gcp
kubernetes

1 Answer

1/17/2018

It was a resource problem and node pool size was inhibiting the deployments.I was mistaken in trying to provide google compute instances and disks.

I ended up provisioning Kubernetes node pools with more cpu and disk space and solved it. I also added elasticity by provisioning autoscaling.

here is a node pool documentation

here is a terraform Kubernetes deployment

here is the machine type documentation

-- Rubber Duck
Source: StackOverflow