How Do You Troubleshoot an Error with a Certificate When You Are Trying to Configure a Docker Registry?

Problem scenario
You get an error about a certificate not working with your host/server name.  One of the following apply to your situation:

When you use “docker login” you get this message:
“Error response from daemon: x509: certificate is not valid for your server”

OR

When you try to use curl to the Docker registry server you get this error:
curl: (51) SSL: certificate subject name 

How Do You Create Kubernetes Pods with a .YAML File That Use a Docker Image from a Google Container Registry Instead of Docker Hub?

Problem scenario
You have a .yaml configuration file that works with the kubectl command to create a deployment.  You want to change the source image from the hub.docker.com to a Google container source.  How do you configure the .yaml file to obtain the image from a Google container registry instead of Docker Hub?

Your .yaml file has these four lines (among other lines):

  spec:
     

How Do You Enter a Docker Container?

Problem scenario
You have a Docker host that is running Linux (the server with Docker containers).  You want to run commands inside a Docker container.  How do you get into a Docker container?

Solution
Prerequisite
You need to know the container ID of a running container.  To find it run this: docker ps -a

Procedures
Run this command:
docker exec -it <container IDbash

You may want to see this 

How Do You Deploy a LAMP Stack Application Powered by Kubernetes?

Problem scenario
You want to deploy your own LAMP stack with the power of Kubernetes.  You do not want to rely on official Docker Hub images for the underlying Docker containers.  How do you do this?

Solution
1.  Deploy Kubernetes to AWS.  If you need help to deploy Kubernetes to AWS, see this link.  If you need assistance installing kubectl on any type of Linux (CentOS/RHEL/Fedora,

How Do You Configure a Docker Host to Be a Client of a Docker Registry?

Problem scenario
Now that the Docker registry is set up and has been tested, you want the “docker login” command to be able to work from other Docker hosts.  How do you configure another server (a Docker host, as a client) to work with a Docker registry server?    

Solution
1.  Install Docker on the server that will be the client.  If you need directions,

How Do You Deploy a Kubernetes Cluster to Azure?

Problem scenario
You want to deploy a Kubernetes cluster to Azure.  You have an Ubuntu Linux server (e.g., with a nano flavor in AWS, a server on-premises, or an one vCPU Azure server with one GB of RAM).  It has no software packages installed on it (e.g., it does not have Docker or Kubernetes).  How do you deploy Kubernetes into Azure (from an instance in AWS)?

Solution
Warning: 

How Do You Deploy Nginx to a Docker Container on an AWS Linux Server?

Problem scenario
You installed Docker (on either Ubuntu or RedHat, see the links if you actually need help with that).  You do not want to create a Docker network on your server. How do you create a simple Docker container with Nginx without creating a user-defined network?

Solution
#1  Run these two commands:
docker pull nginx
docker run –name docker-nginx -p 80:80 nginx

# If the command hangs,

How Do You Troubleshoot the Docker Error “User specified IP address is supported on user defined networks only”?

Problem scenario
When using a “docker run” command you get this error: “Error response from daemon: User specified IP address is supported on user defined networks only.”  What do you do to create a user-defined network?

Solution
#1  From the Linux server (the Docker host), run this command:  ip addr show

#2  Look at the results for eth0. 

How Do You Troubleshoot “docker attach” Commands That Hang?

Problem scenario
You are using RedHat Linux in AWS.  You have installed Docker and have a running container.  You notice that “docker attach <docker ID>” commands are hanging.  What do you to get inside the container?

Solution
Use “docker ps -a” to find the Docker container’s name.  Then use a modified version of this draft of a command:

docker exec -it docker-name bash

#Replace “docker-name” above with the name of the Docker container as found from a “docker ps -a“command.