Kubernetes installation on Rhel7 AWS EC2 - amazon-ec2

I'm trying to install Kubernetes on a brand new Amazon Ec2 with Rhel7 Os running. I have zero knowledge on Kubernetes and trying to learn it. Please help with process of installation.

The most common way of bootstrapping a kubernetes cluster in AWS is through the use of kops (https://github.com/kubernetes/kops).
You can also check kubeadm or kubespray.

Related

Kubernetes - Add a Windows node to a Windows-based control plane

I have installed Docker Desktop and Kubernetes on a Windows machine.
When i run the kubectl get nodes command, I get the following output:
NAME STATUS ROLES AGE VERSION
docker-desktop Ready control-plane 2d1h v1.24.0
So my cluster/control-plane is running properly.
I have a second Windows machine on the same network (in fact its a VM) and I'm trying to add this second machine to the existing cluster.
From what I've seen the control-plane node has to have kubeadm installed but it seems it's only available for Linux.
Is there another tool for Windows-based clusters or is it not possible to do this?
Below are details of docker desktop from docker documentation.
Docker Desktop includes a standalone Kubernetes server and client, as well as Docker CLI integration that runs on your machine. The Kubernetes server runs locally within your Docker instance, is not configurable, and is a single-node cluster..
You can refer kubernetes documentation and create kubernetes cluster with all your windows machines.
The other windows machine can be joined into cluster. Please refer Kubernetes documentation for windows and install kubeadm and run kubeadm join ,which will bootstrap and join the node into kubernetes cluster.
It turns out that the control-plane can only run on a Linux node.
I suspect that the output from the kubectl get nodes command was from a control-plane running on the WSL that Docker-Desktop uses.
So the only option for running a master node on Windows, is to run in a Linux VM.

Not able to access nexus3 OSS on port 8081 installed on Amazon Ec2 RHEL

I have installed Nexus3 OSS on AWS Ec2 using the below link.
http://www.cidevops.com/2017/09/how-to-setup-sonatype-nexus-on-redhat.html
But not able to open with http://public_ip:8081
I have installed httpd too using yum install.
Not sure what am missing here.
Also I have provided http and ssh access while creating instance.

How to connect to kubernetes cluster locally and open dashboard?

I have a new laptop and kubernetes cluster running on Google Cloud Platform. How can I access that cluster from local machine to execute kubectl commands, open dashboard etc?
That is not clearly stated in the documentation.
From your local workstation, you need to have the gcloud tool installed and properly configured to connect to the correct GCE account. Then you can run:
gcloud container clusters get-credentials [CLUSTER_NAME]
This will setup kubectl to connect to your kubernetes cluster.
Of course you'll need to install kubectl either using gcloud with:
gcloud components install kubectl
Or using specific instructions for your operating system.
Please check the following link for more details: https://cloud.google.com/kubernetes-engine/docs/quickstart
Once you have kubectl access you can deploy and access the kubernetes dashboard as described here: https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/
The first thing you would need to do once you've installed Cloud SDK is ensure it is authenticated to your Google Cloud Platform account/project. To do this you need to run:
gcloud auth login
And then follow the on screen instructions.
Also you will need to install kubectl to access/control aspests of your cluster:
gcloud components install kubectl
You can also install it through native package management by following the instructions here.
Once your gcloud is authenticated to your project you can run this to ensure kubectl is pointing at your cluster and authenticated:
gcloud container clusters get-credentials CLUSTER_NAME --zone ZONE
You'll now be able to issue commands with kubectl that target the cluster you defined in the previous step.
You can access the dashboard following the instructions here.

Kubernetes remote cluster setup

How I can setup and securely access a kubernetes cluster on EC2 instance from my laptop? I want it to be a single-node cluster, like running only one instance. Have tried run minikube at EC2 instance, but can't config laptop to connect to it.
So, in the result, I want to run like 10 services/pods in EC2 instance and just debug run on my dev laptop.
Thanks!
You can use KOPS (Kubernetes Ops) to Accomplish this. Its a really handy tool. There's a whole section for configuring a cluster on AWS. I use it on a couple of projects and id really recommend it. Its an easy to understand setup and straight forward.
After the cluster is up you can use kubectl proxy to proxy locally and interact with the cluster. Or use kubectl with config files to set up services and pods.
It does not create a new instance per service or pod it creates a pod on the node(s) that is already existing on the cluster.
In your case you could have a single master and a single node in whatever size that suits your needs.t.2 micro or otherwise
A command to accomplish that would look like:
kops create cluster \
--cloud aws \
--state $KOPS_STATE_STORE \
--node-count $NODE_COUNT \
--zones $ZONES \
--master-zones $MASTER_ZONES \
--node-size $NODE_SIZE \
--master-size $MASTER_SIZE \
-v $V_LOG_LEVEL \
--ssh-public-key $SSH_KEY_PATH \
--name=$CLUSTER_NAME
Where the $NODE_COUNT would be 1 thus having a single Node or EC2 Instance and another instance as the master
To connect to it locally you can also deploy the kubernetes dashboard on your cluster.
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
To access Dashboard from your local workstation you must create a secure channel to your Kubernetes cluster. Run the following command:
kubectl proxy
Now you can access the Dashboard at:
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

connecting to a mesos development cluster on ubuntu 14 machine via opevpn

can someone who has successfully settup a mesos development cluster on google cluster help me out.. i have the clutser running however I am having a hard time creating a vpn to conect to the clutser even though I have openvpn installed on my machine and I have downloded the openvpn file provided by mesos. I am using ubuntu 14. basically i have followed instruction to create the cluster but in order to access mesos, marathon I need to configure a vpn connection by using the openvpn file provided by mesosphere but I do not how to do it on ubuntu 14..
Have you tried openvpn --config <file.ovpn>?

Resources