Coder Social home page Coder Social logo

pratimascripts / kubernetes-zero-to-hero Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iam-veeramalla/kubernetes-zero-to-hero

0.0 0.0 0.0 17 KB

Creating this repo with an intent to make Kubernetes easy for begineers. This is a work-in-progress repo.

kubernetes-zero-to-hero's Introduction

Kubernetes-Zero-to-Hero

Creating this repo with an intent to make Kubernetes easy for begineers. This is a work-in-progress repo.

Kubernetes Installation Using KOPS on EC2

Create an EC2 instance or use your personal laptop.

Dependencies required

  1. Python3
  2. AWS CLI
  3. kubectl

Install dependencies

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y python3-pip apt-transport-https kubectl
pip3 install awscli --upgrade
export PATH="$PATH:/home/ubuntu/.local/bin/"

Install KOPS (our hero for today)

curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64

chmod +x kops-linux-amd64

sudo mv kops-linux-amd64 /usr/local/bin/kops

Provide the below permissions to your IAM user. If you are using the admin user, the below permissions are available by default

  1. AmazonEC2FullAccess
  2. AmazonS3FullAccess
  3. IAMFullAccess
  4. AmazonVPCFullAccess

Set up AWS CLI configuration on your EC2 Instance or Laptop.

Run aws configure

Kubernetes Cluster Installation

Please follow the steps carefully and read each command before executing.

Create S3 bucket for storing the KOPS objects.

aws s3api create-bucket --bucket kops-abhi-storage --region us-east-1

Create the cluster

kops create cluster --name=demok8scluster.k8s.local --state=s3://kops-abhi-storage --zones=us-east-1a --node-count=1 --node-size=t2.micro --master-size=t2.micro  --master-volume-size=8 --node-volume-size=8

Important: Edit the configuration as there are multiple resources created which won't fall into the free tier.

kops edit cluster myfirstcluster.k8s.local

Step 12: Build the cluster

kops update cluster demok8scluster.k8s.local --yes --state=s3://kops-abhi-storage

This will take a few minutes to create............

After a few mins, run the below command to verify the cluster installation.

kops validate cluster demok8scluster.k8s.local

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.