How Do You Create a Kubernetes Cluster?

Problem scenario
You want to create a Kubernetes cluster. What should you do?

Solution
You should install Kubernetes. You will need a proper .yaml file in a directory on a server with kubectl installed and configured. You would then run a “kubectl create” command. See this posting for more information.

 » Read more..

How Do You Know if You Have Helm Installed and what Version You Are Using?

Problem scenario
You want to use Helm to manage Kubernetes applications. Helm helps you with packages for changes to Kubernetes (in ways that are similar to yum or apt). Helm uses what are call Charts (.yaml files) that enable you to do more with Kubernetes with less trouble. Helm consists of these two things: a CLI tool and a server component that runs as a pod in a Kubernetes cluster (page 531 of Kubernetes in Action by Luksa).

 » Read more..

How Do You Install Helm on a Debian or Ubuntu Linux Server without Internet Access?

Problem scenario
You want to use Helm to manage Kubernetes applications. Helm helps you with packages for changes to Kubernetes (in ways that are similar to yum or apt). Helm uses what are call Charts (.yaml files) that enable you to do more with Kubernetes with less trouble. Helm consists of these two things: a CLI tool and a server component that runs as a pod in a Kubernetes cluster (page 531 of Kubernetes in Action by Luksa).

 » Read more..

How Do You Scale Out the Nodes of an AKS Cluster?

Problem scenario
You are using AKS (Azure Kubernetes Service). You have a cluster that you want to have more nodes. (Please do not confuse nodes with pods; see this posting if you are not sure about the difference.) What should you do?

Solution
You need to know the name of the cluster and the resource group it is in. Draft a command like this:

az aks scale –name foocluster –node-count 5 –resource-group barrg

-Replace “5” with the number of nodes you want to scale up.

 » Read more..

What is a Secret in Kubernetes?

Question
What is a Secret in Kubernetes?

Answer
It is a ConfigMap with sensitive data that is encoded in Base64 text. What is a ConfigMap? It is a .yaml with a special format. There is always a “data:” section that is part of the YAML definition of a ConfigMap. The key-value pairs in the “data” section will have keys that appear in regular text;

 » Read more..

How Do You Troubleshoot the AWS Error “could not get token: NoCredentialProviders: no valid providers in chain. Deprecated.”

Problem scenario
You run this command: kubectl get svc

You receive this:
” could not get token: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors”

What should you do?

Solution
Install and configure the AWS CLI. If you need assistance with this, see this posting.

 » Read more..

What is a Service, a Deployment, an HPA, a Pod, an Ingress, a Secret, and a Node in Kubernetes?

Question
In Kubernetes you have heard of these things: service, deployment, HPA, pod, ingress, secret, configmap, and node. What are they?

Answer
Click on the relevant question for its answer:
What is a Secret in Kubernetes?
What is a ConfigMap in Kubernetes?
What is a Deployment in Kubernetes?
What is an Ingress Resource in Kubernetes?

 » Read more..

How Do You Deploy AKS (Azure’s Kubernetes) Using the GUI?

Problem scenario
You want to use Azure’s Kubernetes PaaS offering using the GUI. What do you do?

Solution

1. Sign into the Azure portal.
2. Click on “Services” on the left.
3. Click on “Containers”.
4. Click on “Kubernetes services”.
5. Click “Add”.
6. Fill out the required fields.
7. Click the “Review + create” button.

 » Read more..

What is a ConfigMap in Kubernetes?

Question
What is a ConfigMap in Kubernetes?

Answer
A ConfigMap is a mapping of configuration in YAML format. A .yaml file will define the version of the Kubernetes API (e.g., version 1), data, and the “kind:” key will be set to “ConfigMap”.

The content of the ConfigMap is consumed by an application in Kubernetes. The values in the ConfigMap are “passed to containers as either environment variables or as files in a volume” (page 198 Kubernetes in Action by Luksa).

 » Read more..

What is an HPA in Kubernetes?

Question
What is an HPA in Kubernetes?

Answer
HPA stands for HorizontalPodAutoscaler. It is a concept and resource that allows clusters to scale out upon a certain condition being met. HPA can support a pod to scale based on certain amounts of CPU utilization. It natively supports granular CPU requests down to a single millicore. A .yaml file in Kubneretes has the key “kind”;

 » Read more..