How Do You Use the least_conn Directive in an Nginx Configuration File?

Problem scenario
You have configured Nginx to be an HTTP load balancer (a web server configured to behave as a landing portal that enables traffic to pass through).  As a reverse proxy with built-in keywords you have use the “least_conn” directive, but it does not seem to be working.  You want inbound network connection requests from your users via web browsers to be relayed to the web servers with the fewest (or least) amount of active connections. 

How Do You Know if kubectl Is Installed on Your Linux Server?

One or both of the following scenarios applies.

Problem scenario #1
Try to install kubectl, but you get an error message about it being installed.

Problem scenario #2
You run “man kubectl” but you see no man page. You still think kubectl is installed.

What should you do?

Solution
Run this command: kubectl version
The results should give you some clues as to what is wrong.

How Do You Troubleshoot The Kerberos Error ‘kinit: Cannot find KDC for realm “CONTINUALINTEGRATION.COM” while getting initial credentials’?

Problem Scenario
You run a “kinit” command. But you receive this:

‘kinit: Cannot find KDC for realm “CONTINUALINTEGRATION.COM” while getting initial credentials’

What should you do?

Solution
Look at the /etc/krb5.conf file. Look at the REALM section. Does it look like this?

[realms]
EXAMPLE.COM =

You need to change “EXAMPLE.COM” to your domain name.

Look also at the libdefaults section.

How Do You Troubleshoot the Vagrant Error “No usable default provider could be found for your system.”?

Problem scenario
On a Linux server you get “No usable default provider could be found for your system.” What should you do?

Solution
Install VirtualBox. On an Ubuntu server with 0.5 GB of RAM, you can simply run this command:

sudo apt-get -y install virtualbox

How Do You Fix the Problem of “permission denied” when Trying to Copy a File to a Directory?

Problem scenario
You try to copy a file. It fails with “Permission denied.” What should you do?

Possible Solutions
1. Are the permissions of the destination folder/directory permissive? Is you user supposed to be able to write to the destination folder/directory?

2. Is there an open file in the destination directory? Sometimes this can cause unexpected problems (e.g., with Git Bash).

Excellent Generic Troubleshooting Tips for I.T. work (e.g., DevOps tasks)

At the time of writing, we suggest these troubleshooting steps for many I.T. tasks. Some of these will not apply to every problem. But if you do not know where to begin, this can help you with “DevOps block.”

1. Find the word “error” in the logs. Look at a log with vi (e.g., copy the log to a location where it will not be continually written to). Open the copy with vi.

What is a Container Breakout?

Question
What is a container breakout?

Answer
A container breakout is an the act of a user or process in a container gaining access to its underlying host server. Containerization is the isolation of processes and/or disk space on a server. A container is isolated from the host server via cgroups and namespaces. Bypassing the cgroup(s) and namespace(s) through intentional acts can be desirable for legitimate systems engineers.

Do the Credentials “****” in Jenkins, Taken from the Credentials Plugin, Have the Username or the Password?

Problem Scenario
You want to use the credentials from the Jenkins credentials plugin in a Jenkins pipeline. When you assign the credentials to a variable in a pipeline, is it the username, the password, both or something else?

Solution
It is the username and password, but the two are separated by a colon. You will only see “****” in the console output (for security reasons).