Where Is The “Welcome to Nginx!” Page Stored in a Docker Container?

Problem scenario
You installed Nginx in a Docker container on a RedHat Linux server.  You go to this container with a web browser and see the default screen.  Where is the default file (on the back-end) that users see from the front-end by default that says “Welcome to nginx!”?

Solution
This is the name and location of the file (assuming the Docker container was created via the public repository):

/usr/share/nginx/html/index.html

How Do You Find the URL (or HTTP Endpoint) of a Kubernetes Cluster Running in Amazon EKS?

Problem scenario
You have a Kubernetes cluster in AWS. You have the AWS CLI installed. How do you find the URL for the Kubernetes cluster?

Solution
1. Run this command: aws eks list-clusters

2. Run this command: aws eks describe-cluster foobar # where “foobar” was name determined in above command

How Do You Use the aws update-kubeconfig Command?

Problem scenario
You want to manage your Amazon Kubernetes (i.e., EKS) cluster. You have installed the AWS CLI version on a Linux server, and you want to use the update-config or update-kubeconfig command.

But when you try you see messages like “error argument command: Invalid choice…” or “update-config: command not found”. You could not readily find an example. What should you do?

Solution
Background
The command is update-kubeconfig,

How Do You Terminate Pods in Kubernetes?

Problem scenario
You have some Pods in Kubernetes that you want deleted. What should you do?

Solution
1. Find the names. You can run this to find out: kubectl get pods

2. Run this command, but replace “foobar” with the name of the pod you want deleted: kubectl delete pods foobar

3. That should be it. Run kubectl get pods to verify deletion was successful.

How Do You Troubleshoot a Docker Container Supporting a Web Service That Web Browsers Cannot Seem to Reach?

Problem scenario
You have configured a Docker container with a web service (e.g., Apache web server or Nginx).  You configured the listening, external port to be 80 or a different port number.  You find the web server (either Apache or Nginx) is not working from a web browser.  How do you find what is wrong?

Solution
#1  Use nmap to test the port and IP address. 

How Do You Know if kubectl Is Installed on Your Linux Server?

One or both of the following scenarios applies.

Problem scenario #1
Try to install kubectl, but you get an error message about it being installed.

Problem scenario #2
You run “man kubectl” but you see no man page. You still think kubectl is installed.

What should you do?

Solution
Run this command: kubectl version
The results should give you some clues as to what is wrong.

What is a Container Breakout?

Question
What is a container breakout?

Answer
A container breakout is an the act of a user or process in a container gaining access to its underlying host server. Containerization is the isolation of processes and/or disk space on a server. A container is isolated from the host server via cgroups and namespaces. Bypassing the cgroup(s) and namespace(s) through intentional acts can be desirable for legitimate systems engineers.

How Do You Troubleshoot This Problem “[ERROR KubeletVersion]: couldn’t get kubelet version: executable file not found in $PATH”?

Problem scenario
You run this command: sudo kubeadm init

You get this problem: “[ERROR KubeletVersion]: couldn’t get kubelet version: executable file not found in $PATH”

What should you do?

Solution
Install kubelet. See this posting you need assistance. (If it is a Red Hat distribution of Linux, you can try How Do You Install kubectl,