What Is The Difference between a Kubernetes Service, the Kubelet, and the Kubernetes API?

Question
You know of different Kubernetes components: the Kubernetes Service, the Kubelet, and the Kubernetes API.  What do these components do and how are they different?

Answer
A Kubernetes service is an entity, that may span nodes, that keeps a group of Pods functional and coherent (paraphrased from this site).  A “[s]ervice will get its own IP address and port” as quoted from page 339 of Kubernetes in Action

What Is The Difference between kubeadm and kubectl?

Problem scenario
Both kubeadm and kubectl are tools and commands for Kubernetes.  What are the differences between them?

Answer
kubeadm is for creating new Kubernetes clusters (as paraphrased from this Kubernetes.io page).  The command can be used to create both master nodes as well as worker nodes (taken from pg 575 Kubernetes in Action).

kubectl is for running operations on one or more existing Kubernetes clusters (as paraphrased from this 

How Do You Fix the Problem When You Get “docker command not found”?

Problem scenario
Docker is installed as far as you can tell on your Linux server.  You ran “sudo apt-get -y install docker” and it seemed to work.  When you run it again you see this:

“Building dependency tree
Reading state information… Done
docker is already the newest version (1.5-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

How do you get Docker to work when it seems installed but you get the error “docker command not found”?

How Do You Find the Subscription ID for an Azure Account?

Problem scenario
You want to find the subscription ID for your Azure account.  What do you do?

Possible Solution #1
Log into the Azure Portal.  In the upper right click on your account and then click on “My permissions.”  You should see an alphanumeric string near your subscription.

Possible Solution #2
Prerequisite

If you have Windows 7 you need to install Azure PowerShell;

How Do You Delete a CloudFormation Stack with the AWS CLI?

Problem scenario
You deployed servers with CloudFormation.  You know the name of the stack.  How do you delete the stack with the AWS CLI?

Solution

Prerequisite
This assumes you have installed and configured the AWS CLI.  If you need help with this, see this posting.

Procedure
Run this command (but replace “continualstack” with the name of the stack that you want to delete:
aws cloudformation delete-stack –stack-name continualstack

How Do You Copy All the Files in a Given Subdirectory and Place Them into a New .tar.gz File?

Problem scenario
You want to make copies of every file in a subdirectory and create a single .tar.gz file.  What do you do?

Possible Solution #1 (the files with the full path aka directory tree they are in)
Run this command: tar -czvf archive.tar.gz /path/to/source/files/subdirectory/

The above command will take a copy of all the files in /path/to/source/files/subdirectory/ and create a single file that is compressed with those copies. 

How Do You Write a Groovy Program to Read in User Input from the Keyboard and Print It Out?

Problem scenario
You want to test out Groovy as a scripting language.  You want a Groovy program to read in user input and print it out to the screen.  How do you do this?

Prerequisite
This assumes that you have already installed Groovy on a Linux server.  If you are running a Red Hat derivative (e.g., CentOS, RHEL, or Fedora), click on this link

How Do You Unprotect a Git Repository That Is in a GitLab Project?

Problem scenario
You have a Git repository that is protected in a GitLab project.  You want to allow developers to upload code directly to the master branch (not alternative branches).  What do you do?

Solution
It may be more advisable to work with a branch of a git repository.  This is a basic solution for testing or those instances when you want to work directly with the master branch.  

How Do You Pronounce quay.io?

Problem scenario
You are interested in the quay.io to store Docker images. You do not know how to say the term “quay” as in “quay.io.” How should it be pronounced?

Answer
The word “quay” is pronounced “kway” (rhymes with stray). (The pronunciation “key” may be acceptable too.) If you want to see the source, click on this external page:
https://developers.redhat.com/blog/2019/06/26/using-quay-io-to-find-vulnerabilities-in-your-container-images/