What is a Service Mesh?

Question
What is a service mesh?

Answer
In the context of Kubernetes, it is something that “provides infrastructure services for traffic management, observability, and security” for container connectivity (as explained on page 230 of Kubernetes Patterns by Bilgin Ibryam and Roland Huß (O’Reilly). Copyright 2019 Bilgin Ibryam and Roland Huß, 978-1-492-05028-5). A service mesh will often use a sidecar.

How Do You Troubleshoot the Error “Unable to connect to the server: dial tcp: lookup … eks.amazonaws.com on x.x.x.x:53: no such host” when Running kubectl Commands?

Problem scenario
kubectl commands are failing with an error message like this: “Unable to connect to the server: dial tcp: lookup ABCD123EFG.gr7.us-west-1.eks.amazonaws.com on x.x.x.x:53: no such host”

How do you get kubectl commands to work?

Possible Solution #1
If you are using EKS and you have the name of the cluster (e.g., “foobar”), run a command like this:

aws eks update-kubeconfig –name foobar

Possible Solution #2

  1. Find what VPC your EC-2 instance is in.

How Do You Create an IAM Role in AWS to Allow for Nodegroups to Be Created in EKS?

Problem scenario
In the AWS Management Console, you cannot add a Node to an EKS cluster. The “Node IAM Role” never has any option. You click the “refresh” arrow, but all you see is “No roles found. Follow the link above to create a new role.” What should you do?

Solution

1. Install and configure the AWS CLI. If you need assistance with this,

How Do You Get Kubernetes Nodes to Be Ready?

Problem scenario
Your Kubernetes cluster is not working. The nodes are not ready. You see your Kubernetes nodes are not ready (with kubectl get nodes). You also see this error from a kubectl describe node foobar command:

runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized

What should you do?

(If you get a different error,

How Do You Find out What CNI Plugin Has Been Installed in Your Kubernetes Cluster?

Problem scenario
You want to know what CNI plugin your Kubernetes cluster is using (e.g., Flannel, Calico, Weave Net, Romana or another one). What do you do?

Possible solution
“You can install only one Pod network per cluster.” taken from Kubernetes.io.

Go to a worker node and run these commands and look at the output:

ls -lh /etc/cni/net.d

ls -lh /opt/cni/bin | grep -i flannel

ls -lh /opt/cni/bin | grep -i calico

Use the sudo find / -name command to search for Romana or Weavenet vestiges.

How Do You Troubleshoot an Error Trying to Delete a VPC, Network Interface, or Subnet ID?

One (or more) of the following problems is applicable:

Problem scenario #1
You are trying to delete an network interface in AWS. But you get an error “You are not allowed to manage ‘ela-attach’ attachments.” What should you do?

Problem scenario #2
You are trying to delete a subnet from AWS’ VPC. But you get this error:

Note that the following subnets cannot be deleted: The following subnets contain one or more network interfaces, …