Mon 05 December 2016

Minukube is an easy way to run Kubernetes locally.
When we want to build a Docker image in Minukube (so Kubernetes has an access to it),
we can configure our Docker client to communicate with the Minikube Docker daemon.

$ minikube start
Starting local Kubernetes cluster...Kubectl is now configured to use the cluster.$eval$(minikube docker-env)$ docker build -t fizz/bazz:latest .

What if we need to create a Kubernetes Deployment which pulls a Docker image from AWS ECR?

Kubernetes will fail to get the image due to authentication error (no credentials).
One of the solutions is to use imagePullSecrets.
The following command creates a secret for use with a Docker registry.

Log in to Amazon ECR registry.
This aws command will display $ docker login command. From its output we conclude that
DOCKER_USER is AWS, DOCKER_PASSWORD is SomeVeryLongToken and DOCKER_REGISTRY_SERVER
is https://4338991606.dkr.ecr.eu-west-1.amazonaws.com respectively.