Skip to content

Fully Automated Kubernetes setup on MAC Silicon M1/M2 laptops using Vagrant and VMWare Fusion

License

CC0-1.0, GPL-3.0 licenses found

Licenses found

CC0-1.0
LICENSE
GPL-3.0
LICENSE.md
Notifications You must be signed in to change notification settings

techiescamp/vagrant-kubeadm-mac-silicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Certification Voucher (UpTo 65% OFF - Cyber Monday Offer) 🎉

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 50% today using code CYBER24CCTECHIES at https://kube.promo/devops. It is a limited-time offer from the Linux Foundation.

The following are the best bundles to save upto 65% (up to $1087 savings) with code CYBER24BUNDLECT

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

Vagrant Kubeadm Cluster MAC Silicon

Fully Automated Kubernetes setup on MAC Silicon M1/M2 laptops using Vagrant and VMWare Fusion.

It can be used as CKA, CKAD, and CKS practice lab.

For MAC intel based setup, check - Vagrant Kubeadm Setup on MAC Intel

Here is the high level workflow.

Prerequisites

A working Vagrant setup using VMware Fusion on MAC.

To install Vagrant & VMWare Fusion please refere this detailed Document Vagrant + Vmware Fusion Setup

Important Note: Please restart the system after the installation.

Bring Up the Cluster

To provision the cluster, execute the following commands.

Important Note: You have to use sudo with all the vagrant commands.

git clone https://github.com/techiescamp/vagrant-kubeadm-mac-silicon.git
cd vagrant-kubeadm-mac-silicon
sudo vagrant up

Set Kubeconfig file variable

You can connect to the Vagrant cluster from your local mac terminal by configuring the following.

cd vagrant-kubeadm-mac-silicon
cd configs
sudo chmod +r config 
export KUBECONFIG=$(pwd)/config

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

cp config ~/.kube/

Validate the cluster access

kubectl get po -n kube-system

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,

sudo vagrant halt

To restart the cluster,

sudo vagrant up

To destroy the cluster,

sudo vagrant destroy -f

About

Fully Automated Kubernetes setup on MAC Silicon M1/M2 laptops using Vagrant and VMWare Fusion

Resources

License

CC0-1.0, GPL-3.0 licenses found

Licenses found

CC0-1.0
LICENSE
GPL-3.0
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages