How Do You Determine the IP Address Assignments of Running Docker Containers?

Problem scenario
You created some Docker containers and assigned them IP addresses. How do you find out what their IP addresses are?

Solution

1. Run this command: docker ps -a # find the container ID of the container you want to know about
2. Run this command but substitute “container_id” with the container ID you found above:
docker inspect -f ‘{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}’ container_id

How Do You Set up a Send-Only (Postfix) Email Server on a Linux RHEL AWS Instance?

Problem scenario
You have a monitoring tool on a RedHat Enterprise Linux server that needs to send out emails upon certain events happening. You want to install and configure an email server. You need to send outbound emails, but you do not need to receive inbound emails. How do you configure RHEL to be able to send out regular emails over the internet?

Prerequisite
This assumes that Postfix has been installed.

How Do You Test if a REST API Call Is Reaching a Linux Server?

Problem scenario
You have a Linux server with a web service listening on port 443 (or some other port). You are not sure if another server can reach this Linux server. There could be firewall issues or network problems restricting connectivity on a given port. You have used ping to test connectivity. You have used nmap to verify the port is listening. But you are not 100% sure the REST calls are reaching the intended server on the correct port (e.g.,

What Are The Advantages of a Service over an Ingress in Kubernetes?

Problem scenario
You have read that Ingresses have benefits compared to Services. You know the two are different for routing external traffic to reach a Kubernetes pod. When would you want to use a Service instead of an Ingress?

Possible Answers

  1. When you want to direct traffic to Pods based on a selector and not an IP address. Ingresses use IP addresses*,

How Do You Troubleshoot the kubectl Error “Unable to connect to the server: dial tcp: lookup ,,, no such host”?

Problem scenario

You run this command:
kubectl get cluster-info

You receive this error message:
“Unable to connect to the server: dial tcp: lookup ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789.yl4.FQDN.com on 172.55.44.33: no such host”

Solution

Possible solution #1
Ask yourself these three questions:

  1. Have you recently destroyed a Kubernetes cluster?
  2. Is the intended Kubernetes cluster running?

How Do You Secure a Docker Container, a Docker Host, and Their Network?

Problem Scenario
You have been tasked with finding ways of securing Docker containers, a Docker host, and your network that has Docker containers.  How do you harden a Docker container and its related infrastructure (i.e., the Docker network and Docker host)?

Solution
Overview

From a pragmatic perspective we understand that there are exceptions to the recommended practices.  (Not the least of which is the rapid rate that technology changes.)  The assertions below are recommended practices. 

How Do You Troubleshoot Connecting to a Docker Registry when You Receive an Error Response from a Daemon about an “i/o timeout”?

Problem scenario
You run a command like this: docker login docker.artifactory

You receive a message like this:
“Error response from daemon: Get https://docker.artifactory:80/v1/users/: dial tcp x.x.x.x:443: i/o timeout”

What should you do?

Solution
Make sure there is no firewall or security group blocking connectivity from the client reaching the Docker registry.  Even if you are running the “docker registry” command from the back-end of the Docker registry server itself,