Skip to content

Instantly share code, notes, and snippets.

View sheikhnavezz's full-sized avatar
😎
Online

Sheikh Navez sheikhnavezz

😎
Online
View GitHub Profile
@sheikhnavezz
sheikhnavezz / minikube_on_windows.md
Last active May 10, 2024 10:37
windows minikube installation

Install minikube on windows 10

1. first you have to install chocolatey (package manager) on windows for that :

open windows powershell with (run as administrator) paste below command in it:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

You have successfully installed chocolatey in your system you can use chocolatey from anywhere in your system. Now close the powershell

@sheikhnavezz
sheikhnavezz / minikube installation on ubuntu.md
Last active June 5, 2024 19:04
Minikube Installation procedure on Ubuntu OS

Minikube Installation on ubuntu

Update system:

before installing any software, you need to update the system you are working on. here, we use Ubuntu OS and the commands are:

           sudo apt-get update -y 

1. Install docker:

@sheikhnavezz
sheikhnavezz / vpc_creation
Last active April 20, 2024 09:35
With the help of this Terraform code gist you can create vpc with subnet, route table. rtb association, igw in us-east-2 (Ohio) region.
terraform_project/
├── vpc/
│ ├── main.tf
│ ├── variables.tf
│ └── outputs.tf
└── main.tf
└── provider.tf
@sheikhnavezz
sheikhnavezz / jenkins installation using terraform
Last active April 20, 2024 09:36
Install jenkins on AWS instance via terraform and automate the manual process of taking ssh and performing the steps of script installation for jenkins on your server.
Topic: How to install jenkins via terraform without manually taking ssh of the created instance?
Steps :
1. write code for instance (here I have choosen ubuntu ami-id), default vpc and subnet.
2. write code for security_group
3. import manual key in your aws accout where you will get public and private key by using ssh-keygen cmd
4. Vs code:
create a dir. named as : Jenkins
create files in the jenkins folder:
main.tf, variables.tf, terraform.tfvars, keys, provider.tf, output.tf, jenkins.sh
@sheikhnavezz
sheikhnavezz / ec2_instance
Last active June 14, 2024 15:19
Terraform code creating EC2 instance with keypair
project_directory/
├──provider.tf
├── main.tf
├── Modules
├── Key_pair/
└── main.tf
├── ec2/
└── main.tf
└── variables.tf
@sheikhnavezz
sheikhnavezz / EKS_cluster.md
Created March 18, 2024 10:12
This snippet will create EKS Cluster

This Terraform code for creating EKS cluster, including a private subnet, IAM role for EKS worker nodes with attached policies such as AmazonEKSWorkerNodePolicy, AmazonEC2ContainerRegistryReadOnly, and AmazonEKS_CNI_Policy. then deploys an Amazon EKS cluster within the VPC, along with a node group for worker nodes. Additionally, it provisions EC2 instances with basic configurations and manages SSH key pairs for secure access to these instances.

provider.tf :

  provider "aws" {
  region = "us-east-2" # Change to your desired AWS region
  profile = "tf-navez"
  }
@sheikhnavezz
sheikhnavezz / K8s_architecture.md
Last active May 20, 2024 07:53
This Gist is the explanation of Kubernetes Architecture.

image

MASTER Node

Kube API Server :

(handles all the requests and enable communication across cluster )

In Simple terms, after installing the kubectl on the master node developers run the commands to create pods.

@sheikhnavezz
sheikhnavezz / ssh get inactive.md
Created March 9, 2024 19:03
This file contains the solution for ssh getting inactive after few minutes

If your SSH connection to an AWS instance is getting disconnected every 5 minutes of idle time, it is likely due to the default timeout settings of the AWS server.

The server is configured to drop your connection afteronly 60 seconds of inactivity .

To avoid this, you can set a keep-alive option in your

 ~/.ssh/config

file on the client’s home directory. Add the following line to the file:

@sheikhnavezz
sheikhnavezz / install_docker.sh
Created March 9, 2024 18:18
This is shell script file for steps to install docker (ubuntu 22.04)
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
@sheikhnavezz
sheikhnavezz / jenkins_install.sh
Created March 9, 2024 17:06
This is shell script file for Steps for installing jenkins (ubuntu 22.04)
sudo apt install fontconfig openjdk-17-jre -y
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins -y