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 Apache Mesos and Apache Marathon to an Ubuntu Linux Server in AWS?

Problem scenario
You want to install Apache Mesos and Apache Marathon to an Ubuntu 16.x Linux server in AWS.  How do you do this?

Prerequisites
You need two Linux instances with relevant Security Group rules added to allow for connectivity between the two.  One Ubuntu Linux server will be for the Mesos master and the other server will be for the Mesos slave.  You also need to be able to use a web browser to the Mesos master server. 

How Do You Install kubectl, kubeadm, and kubelet on a CentOS/RHEL/Fedora Server?

Problem scenario
You have a Red Hat derivative distribution of Linux.  You want to use some core Kubernetes utilities.  How do you install kubectl, kubeadm, and kubelet on Linux?

Solution
1.  Create a file /etc/yum.repos.d/kubernetes.repo2.  Have this be the content:

[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

2.  Run this: sudo yum -y install kubelet kubeadm kubectl

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 Can You Learn about Kubernetes in One Hour?

Problem scenario
You need to learn more about Kubernetes but do not know where to start.  You have roughly one hour to try to know much more about Kubernetes.  What should you do?

Solution
For an introduction to Kubernetes, see these two articles from Linux.com and TechTarget.

This DigitalOcean article is a little out of date (as of 9/18/17),

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.