Giter Club home page Giter Club logo

vagrant-kubeadm-kubernetes's Introduction

Vagrantfile and Scripts to Automate Kubernetes Setup using Kubeadm [Practice Environment for CKA/CKAD and CKS Exams]

A fully automated setup for CKA, CKAD, and CKS practice labs is tested on the following systems:

  • Windows
  • Ubuntu Desktop
  • Mac Intel-based systems

If you are MAC Silicon user, Please use the follwing repo.

CKA, CKAD, CKS, or KCNA Vouchers Codes

Important Note: This extended Offer Ends Very Soon

As part of our commitment to helping the DevOps community save money on Kubernetes Certifications, we continuously update the latest voucher codes from the Linux Foundation

๐Ÿš€ CKA, CKAD, CKS, or KCNA exam aspirants can save 20% today using code DCUBE20 at https://kube.promo/devops. It is a limited-time offer from the Linux Foundation.

The following are the best bundles to save extra 25 with code COMBUNDLE25

Use code SCRIPT20 to save $326 with the following bundle.

Note: You have one year of validity to appear for the certification exam after registration

Setup Prerequisites

  • A working Vagrant setup using Vagrant + VirtualBox

Documentation

Current k8s version for CKA, CKAD, and CKS exam: 1.29.

The setup is updated with 1.29 cluster version.

Refer to this link for documentation full: https://devopscube.com/kubernetes-cluster-vagrant/

Prerequisites

  1. Working Vagrant setup
  2. 8 Gig + RAM workstation as the Vms use 3 vCPUS and 4+ GB RAM

For MAC/Linux Users

The latest version of Virtualbox for Mac/Linux can cause issues.

Create/edit the /etc/vbox/networks.conf file and add the following to avoid any network-related issues.

* 0.0.0.0/0 ::/0

or run below commands

sudo mkdir -p /etc/vbox/
echo "* 0.0.0.0/0 ::/0" | sudo tee -a /etc/vbox/networks.conf

So that the host only networks can be in any range, not just 192.168.56.0/21 as described here: https://discuss.hashicorp.com/t/vagrant-2-2-18-osx-11-6-cannot-create-private-network/30984/23

Bring Up the Cluster

To provision the cluster, execute the following commands.

git clone https://github.com/scriptcamp/vagrant-kubeadm-kubernetes.git
cd vagrant-kubeadm-kubernetes
vagrant up

Set Kubeconfig file variable

cd vagrant-kubeadm-kubernetes
cd configs
export KUBECONFIG=$(pwd)/config

or you can copy the config file to .kube directory.

cp config ~/.kube/

Install Kubernetes Dashboard

The dashboard is automatically installed by default, but it can be skipped by commenting out the dashboard version in settings.yaml before running vagrant up.

If you skip the dashboard installation, you can deploy it later by enabling it in settings.yaml and running the following:

vagrant ssh -c "/vagrant/scripts/dashboard.sh" controlplane

Kubernetes Dashboard Access

To get the login token, copy it from config/token or run the following command:

kubectl -n kubernetes-dashboard get secret/admin-user -o go-template="{{.data.token | base64decode}}"

Make the dashboard accessible:

kubectl proxy

Open the site in your browser:

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

To shutdown the cluster,

vagrant halt

To restart the cluster,

vagrant up

To destroy the cluster,

vagrant destroy -f

vagrant-kubeadm-kubernetes's People

Contributors

techiescamp avatar bibinwilson avatar scriptcamp avatar chieftainy2k avatar chriswells0 avatar ramanagali avatar inkkim avatar sbruzzese902 avatar hollowman6 avatar mhrdq8i avatar magicalbob avatar wils93 avatar dswhitely1 avatar allyunion avatar luisgmuniz avatar maximmai avatar toelke avatar rajivgangadharan avatar hodgiwabi avatar vladislavbannikov avatar thuzxj avatar jxlwqq avatar yishaiz avatar

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.