Giter Club home page Giter Club logo

gcloud-gke-vagrant-ubuntu's Introduction

gcloud-gke-vagrant-ubuntu

enter image description here

About...

This setup is used to install prerequisites that are required to access/create/delete Google Kubernetes Engine.

Table of Contents

Prerequisites

  • Enable Virtualization(VT) in BIOS for Hyper-V
  • Git command line utility which is used to target an existing repository and create a clone, or copy of the target repository
  • Vagrant (Version >= 2.2.0) is an open-source software product for building and maintaining portable virtual software development environments, e.g. for VirtualBox, Hyper-V, Docker containers, VMware, and AWS
  • Oracle VM VirtualBox (Version >= 6.0) lets you run multiple operating systems on Mac OS, Windows, Linux, or Oracle Solaris.
  • Minimum laptop/desktop configuration - 8GBRAM , 4CPU , support for VT-X

Install Vagrant Box

Default settings:env.yaml. These settings can be changed as per your requirements and the below are minimum requirements.

VM:
  ip: 100.10.10.116
  cpus: 2
  memory: 2048
  vmname: gcloud-gke-ubuntu
  hostname: gcloud-gke-ubuntu.com

Open windows (OR) bash terminal from your local windows machine

  • $ git clone https://github.com/SubhakarKotta/gcloud-gke-vagrant-ubuntu.git
  • $ cd gcloud-gke-vagrant-ubuntu/provisioning
  • $ vagrant up

Vagrant Box Details

Name IP OS RAM CPU
gcloud-gke-ubuntu 100.10.10.116 Ubuntu 18.04 2G 2

Create GKE Cluster

Login to vagrant box from your local machine

  • $ cd gcloud-gke-vagrant-ubuntu/provisioning
  • $ vagrant ssh gcloud-gke-ubuntu

Provide GCLOUD Credentials

  • $ gcloud auth login

Create GKE Cluster by following the steps given in the link

  • $ kubectl get nodes [To verify kubectl is connected to aks cluster]

Access Kubernetes Dashboard by following the steps given in the link

Access Kubernetes Dashboard

From local windows system terminal execute the below commands

Use the below command to generate access token to login Dashboard

  • $ kubectl get secret $(kubectl get serviceaccount dashboard -o jsonpath="{.secrets[0].name}") -o jsonpath="{.data.token}" | base64 --decode

Start proxy to access kubernetes dashboard

  • $ kubectl proxy

Click ! http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login

Access GKE Cluster

Login to vagrant box from your local machine

  • $ cd gcloud-gke-vagrant-ubuntu/provisioning
  • $ vagrant ssh gcloud-gke-ubuntu

Provide GCLOUD Credentials

  • $ gcloud auth login

Fetch/Update kubeconfig on your vagrant box

  • $ gcloud container clusters get-credentials <YOUR_CLUSTER_NAME> --zone <YOUR_ZONE_NAME> --project <YOUR_PROJECT_NAME>
  • $ kubectl get nodes [To verify kubectl is connected to aks cluster]

Access Kubernetes Dashboard by following the steps given in the link

Delete GKE Cluster

Login to vagrant box from your local machine

  • $ cd gcloud-gke-vagrant-ubuntu/provisioning
  • $ vagrant ssh gcloud-gke-ubuntu

Provide GCLOUD Credentials

  • $ gcloud auth login

Delete GKE Cluster by following the steps given in the link

Add-Ons provided

  • kubectl
  • gcloud
  • helm

Login Vagrant VM

The Vagrant VM can be accessed in two ways from your local windows machine

vagrant ssh

  • $ cd gcloud-gke-vagrant-ubuntu/provisioning
  • $ vagrant ssh gcloud-gke-ubuntu

putty/mobaxterm

  • 100.10.10.116 [vagrant/vagrant ]

Stop Vagrant VM

Run the below command to stop the Vagrant Box from your local windows machine

  • $ cd gcloud-gke-vagrant-ubuntu/provisioning
  • $ vagrant halt

Restart Vagrant VM

Run the below command to restart the Vagrant Box if the vagrant box is stopped from your local windows machine

  • $ cd gcloud-gke-vagrant-ubuntu/provisioning
  • $ vagrant up

Destroy Vagrant VM

Run the below command to delete the Vagrant Box from your local windows machine

  • $ cd gcloud-gke-vagrant-ubuntu/provisioning
  • $ vagrant destroy

gcloud-gke-vagrant-ubuntu's People

Contributors

s-u-b-h-a-k-a-r avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

cdancy cnb0

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.