Posts

How to install Kubernetes Cluster on AWS EC2 instances

How to install Kubernetes Cluster on AWS EC2 instances This is a guide for setting up a Kubernetes cluster over AWS EC2 instances from scratch. Let’s start with the prerequisites first. Prerequisites: You need to have created at least one AWS EC2 instance for acting as Master node and at least one AWS EC2 instance to act as a worker node. In this tutorial, I have used Amazon Linux 2 AMI when I lunched EC2 instances, which is based on centos Linux. This AMI also has some pre-installed libraries that AWS does for you. However, you can use any centos-based system such as RHEL as well. In that case, most of the commands remain the same. While launching AWS ec2 instances, make sure that you open all the ports in the related security groups. Both the AWS EC2 instances need to be on the same VPC and preferably same availability zone. Needless to say, you need to have putty/terminal to connect to your EC2 instances. Connect to both the ec2 instances using two putty terminals. Decide which EC2 ...

List Of Kubernetes Most Useful Commands

  List Of Kubernetes Most Useful Commands 1. Pods $ kubectl get pods $ kubectl get pods — all-namespaces $ kubectl get pod monkey -o wide $ kubectl get pod monkey -o yaml $ kubectl describe pod monkey 2. Create Deployments Create single deployment: $ kubectl run monkey — image=monkey — record 3. Scaling PODs $ kubectl scale deployment/POD_NAME — replicas=N 4. POD Upgrade and history List history of deployments: $ kubectl rollout history deployment/DEPLOYMENT_NAME Jump to specific revision: $ kubectl rollout undo deployment/DEPLOYMENT_NAME — to-revision=N 5. Services List services: $ kubectl get services Expose PODs as services (creates endpoints) $ kubectl expose deployment/monkey — port=2001 — type=NodePort 6. Volumes List Persistent Volumes and Persistent Volumes Claims: $ kubectl get pv $ kubectl get pvc 7. Secrets List Persistent Volumes and Persistent Volumes Claims: $ kubectl get secrets $ kubectl create secret generic — help $ kubectl create secret generic mysql — from-liter...

Installing metabase on ec2 linux server as a service file.

   Metabase installation   log in with root user # sudo su  Install the java on linux server # sudo amazon-linux-extras install java-openjdk11  Creating a directory  # mkdir ~/metabase Download a metabase.jar file and move to directory to download metabase.jar # wget https://downloads.metabase.com/v0.44.4/metabase.jar    # mv /home/ec2-user/metabase.jar ~/metabase Change directory to metabase # cd ~/metabase Now Run the cammand to run the jar file #  java -jar metabase.jar Do the setup part with http://localhost:3000/setup To make the jar file into service, these are the following steps   # sudo groupadd -r metabase # sudo useradd -r -s /bin/false -g metabase metabase # pwd # sudo chown -R metabase:metabase /home/ec2-user/metabase/directory # sudo touch /var/log/metabase.log  # sudo chown syslog:adm /var/log/metabase.log  # sudo touch /etc/default/metabase  #  sudo chmod 640 /etc/default/metabase Once the fo...