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..

What is an Ingress Resource in Kubernetes?

Question
What is an Ingress resource in Kubernetes?

Answer
It is a Kubernetes technique of exposing services via an individual IP address (page 135 of Kubernetes in Action by Luksa). In TCP/IP networking, the Ingress port allows inbound traffic to route somewhere. Kubernetes supports other IP address to service mapping methods (e.g., NodePort or LoadBalancer). NodePort operates on layer 4 of the OSI seven-layer model (according to this posting).

 » Read more..

What is a Deployment in Kubernetes?

Question
What is a deployment in Kubernetes?

Answer
A deployment is a resource that is designed for “deploying applications and updating them declaratively” (page 261 of Kubernetes in Action by Luksa). You may hear the phrase “Deployment controller.” As far as we know this is a reference to the process that runs in the Kubernetes Control Plane (page 262 of Kubernetes in Action by Luksa).

 » Read more..

What are Higher-level Resources and Constructs Compared to Lower-level Resources and Constructs?

Question
You have read about high/low level or higher-level (or lower-level) resources and constructs in the context of Kubernetes. What does this designation mean?

Answer
From a high level to a low level we may see a data center, filled with racks, which hold physical servers. Similarly from a high level to a low level we may see Kubernetes nodes supporting pods that have individual Docker containers.

 » Read more..

What is a Service in Kubernetes?

Question
A Kubernetes cluster will have a pod running on a node. The ReplicationController will create a copy (or copies) of a pod to ensure it is available. What is a service in the context of a Kubernetes cluster?

Answer
A service is a networking service with a static IP address that connects requests to pods in the Kubernetes cluster (pg 48 of Kubernetes in Action by Luksa).

 » Read more..