How Do You Use the AWS CLI to List Aurora Databases?

Problem scenario
You have an Amazon Aurora database in you AWS account. You want to see the status of this database with the AWS CLI. How do you list information about your Aurora databases?

Solution
Prerequisites

You must have the AWS CLI installed and configured with a user that has the ability to view Aurora databases (e.g., an administrator of your AWS account).

 » Read more..

How Do You Troubleshoot “connection was refused” after Running a kubectl Command?

Problem scenario
You run a command like this: kubectl get svc

You get an error like this: The connection to the server localhost:8080 was refused – did you specify the right host or port?

What should you do?

Possible Solution #1
What is your $KUBECONFIG variable set to? Run this: echo $KUBECONFIG

This may remedy the problem,

 » Read more..

How Do You Set up SSH on a Windows 2016 Server with Cygwin?

Problem scenario
You have a heterogeneous enterprise network of servers. You want your Linux machines to communicate and transfer files with your Windows machines. You do not want to use Active Directory. What do you do?

Solution
1. Install Cygwin on the Windows server if it has not been set up already. If you need assistance with this, see this posting.

 » Read more..

How Do You Find the URL (or HTTP Endpoint) of a Kubernetes Cluster Running in Amazon EKS?

Problem scenario
You have a Kubernetes cluster in AWS. You have the AWS CLI installed. How do you find the URL for the Kubernetes cluster?

Solution
1. Run this command: aws eks list-clusters

2. Run this command: aws eks describe-cluster foobar # where “foobar” was name determined in above command

 » Read more..

How Do You Find what VPC an EC-2 Instance Is In?

Problem scenario
You want to determine what VPC a given AWS server is in. How do you find this out?

Solution
Prerequisite

You must have the AWS CLI installed and configured with a user that has the ability to view EC-2 databases (e.g., an administrator of your AWS account). If you need assistance, see this posting.

Procedure
Run this command: aws rds describe-db-instances | grep -i vpc

 » Read more..

How Do You Install Molecule on RHEL v. 8.x with Python 3?

Problem scenario
You are using RHEL version 8.x. You want to use Python 3 and Molecule. What should you do?

Solution
Prerequisites
i. You should install Docker. If you need assistance, see this posting.
ii. You should install these packages before hand:

sudo yum -y install gcc python3-devel
sudo dnf install -y redhat-rpm-config

Procedures
1.

 » Read more..

How Do You Write a Python Program to Test If Two Words Are Anagrams?

Problem scenario
You want a program to test if two words are anagramous with each other. You want the test to be case insensitive. How do you write a program that will interactively prompt the user for two different words and test if they are anagrams?

Solution
Use this Python 3 program (and it will interactively prompt you to enter two words):

word1 = input(“Enter one word: “).lower()
word2 = input(“Enter a second word: “).lower()

wL1 = list(word1)
wL2 = list(word2)

wL1.sort()
wL2.sort()

if (wL1 == wL2):
print(“The two programs are anagrams!”)
else:
print(“The two words are NOT anagrams!”)

It will not work with Python 2.

 » Read more..

How Do You Find what VPC an Aurora Database Is In?

Problem scenario
You want to be sure that a given Aurora database is in a specific VPC. How do you determine what VPC it is in?

Solution
Prerequisite
You must have the AWS CLI installed and configured with a user that has the ability to view Aurora databases (e.g., an administrator of your AWS account). If you need assistance,

 » Read more..

How Do You Invoke the main Section of a Groovy Program?

Problem scenario
Your Groovy code has a section like this:

class Example {
static void main(String[] args) {

But this section above is not executing when you run your Groovy program. There are no errors however. How do you get it to execute?

Possible Solution #1
Remove lines of code (or statements) that are outside the “class Example {…”

Possible Solution #2
See this posting: How Do You Invoke a Class in a Groovy Program?

 » Read more..

How Do You Use the aws update-kubeconfig Command?

Problem scenario
You want to manage your Amazon Kubernetes (i.e., EKS) cluster. You have installed the AWS CLI version on a Linux server, and you want to use the update-config or update-kubeconfig command.

But when you try you see messages like “error argument command: Invalid choice…” or “update-config: command not found”. You could not readily find an example. What should you do?

Solution
Background
The command is update-kubeconfig,

 » Read more..