How Do You Get Kubernetes to Work as a Test Instance?

Problem scenario
You want to set up Kubernetes on a server as quickly as possible as a proof-of-concept.  You want to create pods without the best practice security mechanisms because you are behind a firewall and in a development environment.  How do you quickly install and configure Kubernetes as a development deployment on a single host server?

Solution
1.  Install and configure kubelet, kubeadm, kubectl,

How Do You Use ECR in AWS?

Problem scenario
You have heard about Amazon Elastic Container Registry.  You want to configure a Docker registry using an AWS PaaS offering.  How do you use ECR?

Solution
1.  Log into the AWS web console.
2.  Go here: https://console.aws.amazon.com/ecs/home#/repositories
3.  Click “Get started” if you have never created a repository before.  If you have created a repository, skip to the next step.
4. 

How Do You Create a Router in OpenShift When You Get an Error about a User Being Forbidden?

Problem scenario
You are trying to create a virtual router in OpenShift.  When you run the command “oc adm router goodname” you get this error:

“error: router could not be created; could not retrieve list of security constraints to verify service account “router”: securitycontextconstraints.security.openshift.io is forbidden: User “jdoe” cannot list securitycontextconstraints.security.openshift.io at the cluster scope: User “jdoe” cannot list all securitycontextconstraints.security.openshift.io in the cluster”

What should you do?

What Are the Differences between Kubernetes and OpenShift?

Question
What are the differences between Kubernetes and OpenShift?

Answer

  • OpenShift was built by Red Hat.  OpenShift did not originally use Kubernetes (OpenShift blog).  Kubernetes was built at Google.
  • Kubernetes is open source whereas OpenShift usually costs money.  There are different types of OpenShift (e.g., OpenShift Online, OpenShift Enterprise etc.).
  • You use “oc” (OpenShift Client) commands with OpenShift that are often identical to “kubectl” commands in the options that they support. 

How Do Install and Configure OpenShift to Test It Out?

Problem scenario
You want to use OpenShift as opposed to Kubernetes.  How do you deploy OpenShift to try it out?

Solution
1.  Install Docker on Linux.  We recommend you use a RedHat OS.  The hardware requirements are not that high if you are just testing it for development and/or learning purposes.  For directions on how to install Docker on a RedHat distribution of Linux, see this 

How Do You Get the Binaries for kube-proxy, kube-apiserver, kube-controller-manager, and kube-scheduler?

Problem scenario
You want to install kube-proxy, kube-apiserver, kube-controller-manager, and kube-scheduler on a Linux server.  You want to be able to run these commands. How do you do this?

Solution

Prerequisite
This requires the Linux server to have access to the internet.

Procedures
1.  Download the first tar ball.

cd /usr/bin
sudo wget https://github.com/kubernetes/kubernetes/releases/download/v1.8.6/kubernetes.tar.gz
# To get the latest version,