Multiple environments (Staging, QA, production, etc) with Kubernetes

What is considered a good practice with K8S for managing multiple environments (QA, Staging, Production, Dev, etc)? As an example, say that a team is working on a product which requires deploying a few APIs, along with a front-end application. Usually, this will require at least 2 environments: Staging: For iterations/testing and validation before releasing … Read more

Restart pods when configmap updates in Kubernetes?

How do I automatically restart Kubernetes pods and pods associated with deployments when their configmap is changed/updated? I know there’s been talk about the ability to automatically restart pods when a config maps changes but to my knowledge this is not yet available in Kubernetes 1.2. So what (I think) I’d like to do is … Read more

How can I debug “ImagePullBackOff”?

All of a sudden, I cannot deploy some images which could be deployed before. I got the following pod status: [root@webdev2 origin]# oc get pods NAME READY STATUS RESTARTS AGE arix-3-yjq9w 0/1 ImagePullBackOff 0 10m docker-registry-2-vqstm 1/1 Running 0 2d router-1-kvjxq 1/1 Running 0 2d The application just won’t start. The pod is not trying … Read more

How can I keep a container running on Kubernetes?

I’m now trying to run a simple container with shell (/bin/bash) on a Kubernetes cluster. I thought that there was a way to keep a container running on a Docker container by using pseudo-tty and detach option (-td option on docker run command). For example, $ sudo docker run -td ubuntu:latest Is there an option … Read more

Kubernetes how to make Deployment to update image

I do have deployment with single pod, with my custom docker image like: containers: – name: mycontainer image: myimage:latest During development I want to push new latest version and make Deployment updated. Can’t find how to do that, without explicitly defining tag/version and increment it for each build, and do kubectl set image deployment/my-deployment mycontainer=myimage:1.9.1 … Read more

How to switch kubectl clusters between gcloud and minikube

I have Kubernetes working well in two different environments, namely in my local environment (MacBook running minikube) and as well as on Google’s Container Engine (GCE, Kubernetes on Google Cloud). I use the MacBook/local environment to develop and test my YAML files and then, upon completion, try them on GCE. Currently I need to work … Read more