How Do You Install These Kubernetes-Related Commands kubelet, kubeadm, kubectl, and etcd on an Ubuntu Server?

Problem scenario
You want to install kubelet, kubeadm, kubectl, and etcd on an Ubuntu server.  How do you do this?

Solution
1.  Run these five commands:

sudo apt-get -y update
sudo apt -y install docker.io
sudo su –
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add –
exit

2.  Use either Method A or Method B.

How Do You Get a Docker Container to Run That Was Made for Graylog?

Problem scenario
You are trying to follow the directions for installing Graylog from Docker hub.  You run these commands:

docker pull graylog2/server

docker run –name contint-mongo -d mongo:2

docker run –name contint-elasticsearch -d elasticsearch:2 elasticsearch -Des.cluster.name=”graylog”

docker run –link contint-mongo:mongo –link contint-elasticsearch:elasticsearch -p 9000:9000 -e GRAYLOG_WEB_ENDPOINT_URI=”http://127.0.0.1:9000/api” -d graylog2/server

The first two containers (for MongoDB and ElasticSearch) work and run.  The third for Graylog will not start. 

How Do You Troubleshoot “curl: (52) Empty reply from server”?

Problem scenario
You are running a curl command.  But you get this error “curl: (52) Empty reply from server.”  What is the problem?

Possible solution #1
You are using curl with a port assignment in the URL (e.g., http://coolname.com:5077).  Try a different port.

Possible solution #2  (This solution is only relevant if the URL endpoint is supported by a Docker container.)
The docker-compose.yml file could be configured incorrectly.  It may refer to files with incorrect paths.  You may need to change the docker-compose.yml file to refer to correct paths.  An alternative solution would be to create the necessary files that the docker-compose.yml file needs and the related subdirectories that the file is looking for.  Your “docker-compose up” command may work with no errors.  But the references to the URL path may produce the “Empty reply from server” if the docker-compose.yml file refers to directory paths (e.g., for nginx listening on a specific port) in subdirectories that do not exist.

[Sassy_Social_Share]

How Do You Deploy the WildFly Application Server in Docker?

Problem scenario
You want to prepare for WildFly Swarm to run Java EE programs.  You want to deploy Red Hat’s WildFly application server in a Docker container.  You are running a Linux server.  What do you do?

Solution
Background
The regular JBoss Application server was renamed to Wildfly.  Do not confuse the JBoss application server with the JBoss web server. 

How Do You Solve the Problem of the “docker login” Command Seeming to Work but Hanging for a Long Period of Time and/or Erroring out with “connection refused”?

Problem scenario
“docker login” is challenging you for a username and password.  But after you enter the credentials and press enter, it hangs.  You are not logging into the Docker registry.  What is wrong?

Solution
It may be surprising, but you can be challenged for a username and password when the Docker registry is turned off.  If a firewall blocks a necessary port to the Docker registry or if the Docker registry’s server is off completely,

How Do You Troubleshoot “Permission Denied” When Trying to Use “Docker Login” to Authenticate with a Docker Registry?

Problem scenario
You are trying to log into a Docker registry but you get this message:

“Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.29/auth: dial unix /var/run/docker.sock: connect: permission denied”

You know the credentials are correct.  What is wrong?

Root cause
It could be that your user account is not a member of the “docker” group on the Linux system. 

How Do You Log into the Kubernetes Dashboard?

Problem scenario
When you completed configuring Kubernetes, you were provided with a URL.  But this web page looks minimalistic with no graphics and a white background.  The web UI is not complete or polished and looks like a YAML file.  How do you get to the regular Kubernetes dashboard that looks like this picture? 

Possible Solution #1
1.  From the command prompt you set up Kubernetes with,

How Do You Solve the Docker Error “x509 certificate signed by unknown authority”?

Problem scenario
When you use docker login from a client server and you are challenged for credentials.  But after you enter the password and press enter you get this error:  “Error response from daemon: Get https://: x509: certificate signed by unknown authority”

You do not login to the Docker registry.  How do you get around this problem so you can log into the Docker registry?

Solution
Use one solution 

How Do You Create a Docker Registry in Ubuntu Linux?

Problem scenario
You do not want to rely on internet-available Docker registries.  You want to have your own private Docker registry in your own AWS network.  You want to share Docker images (to build containers) with your team.  You think that installing/deploying a Docker registry will help you.  What do you do to build and configure (or just set up) your own Docker registry with an Ubuntu 16.x server?

Solution
These directions were tested to work with Ubuntu 16.x in AWS and Azure.