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 Are the Recommended Practices of Monitoring?

Question
AWS’s Five Pillars of Well-Architected Framework recommend monitoring as a component of three of the pillars (operational excellence, reliability and performance efficiency).

There is no question that monitoring is important inside or outside of a public cloud. What patterns or traits might a good centralized monitoring system have?

Answer
Here are 12 characteristics of good monitoring.

1.

 » Read more..

How Do You Make a Web UI Service Accessible to Outside Web Browser Traffic?

Problem scenario
Sometimes you have a web service listening on the loop back IP address on a non-standard port.

When you run nmap -Pn localhost, you see a service is listening on a given port (e.g., 9200). When you run nmap -Pn on an internal or external IP address, you do not see a service listening on that given port. You want to direct traffic to this listening service (e.g.,

 » Read more..

What Is The Immutable Bit vs. The Sticky Bit?

Problem scenario
You have heard of the immutable bit and want to know how it is different from the sticky bit. What is the immutable bit versus the sticky bit? What are the differences between the two?

Solution
We like the term “immutable flag” as opposed to “immutable bit” to help distinguish the two. We have three parts to explain this.

Part 1: What is the immutable flag?

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

Where Can You Find a Complete List of the Reserved Words for Declarative Pipeline Syntax?

Problem scenario
You want to create a Jenksinfile for a pipeline. Where can you find a complete list of the reserved words for Declarative pipeline syntax?

Answer
This external page has something close. It does not go into into how “sh” works. Using “sh” you can run Linux commands. There are “bat” and “powershell” options too. Here is an example (taken from Jenkins’ website) :

pipeline {
agent any
stages {
stage(‘Build’) {
steps {
sh ‘echo “Hello World”‘
sh ”’
echo “Multiline shell steps works too”
ls -lah
”’
}
}
}
}  » 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..

How Do You Use the Docker Pipeline Plugin with Jenkins?

Problem scenario
You want to use the Docker Pipline (with the Jenkins ID of “docker-workflow”). What do you do?

Solution
Prerequisites
Jenkins needs to be installed. If you need assistance, see this posting if you are using a CentOS/RHEL/Fedora server; if you want to install Jenkins on a Debian/Ubuntu server, see this posting.

 » Read more..