Disclaimer: This is just for fun, to play with Kyma on something different then K8s cluster, Minikube or KIND. Do not use on production and at home.
#Install Multipass
brew cask install multipass
#Get VM with Ubuntu that is large enough
multipass launch --name k3s --mem 8G --disk 20G
#Access the VM
multipass shell k3s
#Go into admin mode to not use sudo all the time
sudo su -
Read more on Multipass and running K3s on it:
- https://medium.com/@zhimin.wen/running-k3s-with-multipass-on-mac-fbd559966f7c
- https://medium.com/@mattiaperi/kubernetes-cluster-with-k3s-and-multipass-7532361affa3
- https://www.freshbrewed.science/ubuntu-multipass-better-than-docker/index.html
#Start lightweight k8s cluster
curl -sfL https://get.k3s.io | sh -
#Validate if starup is done, it make take up to 30sec
kubectl get po -A -w
Read more on K3s:
#Create kubeconfig file local system and past there kubeconfig details
#Get details from the VM with below
cat /etc/rancher/k3s/k3s.yaml
#Replace server IP 127.0.0.1 with IP that you get by runnig below, for example 192.168.64.40
#Get the IP of the VM from local system
$multipass list
Name State IPv4 Image
k3s Running 192.168.64.40 Ubuntu 18.04 LTS
#Example kubeconfig file
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJWakNCL3FBREFnRUNBZ0VBTUFvR0NDcUdTTTQ5QkFNQ01DTXhJVEFmQmdOVkJBTU1HR3N6Y3kxelpYSjIKWlhJdFkyRkFNVFUzTVRjM09EQTVPVEFlRncweE9URXdNakl5TVRBeE16bGFGdzB5T1RFd01Ua3lNVEF4TXpsYQpNQ014SVRBZkJnTlZCQU1NR0dzemN5MXpaWEoyWlhJdFkyRkFNVFUzTVRjM09EQTVPVEJaTUJNR0J5cUdTTTQ5CkFnRUdDQ3FHU000OUF3RUhBMElBQkJkNUVCaHVYaGM0WFlQQ05HdjkrOTNWNHd3UFRTdVRITXhjZE9qTFpSV3IKZEdqd3hKQUJBRTJ4V0E1aUtiVkJ6VkhldkYzZFBYaHFiMEExb3I2dEVlV2pJekFoTUE0R0ExVWREd0VCL3dRRQpBd0lDcERBUEJnTlZIUk1CQWY4RUJUQURBUUgvTUFvR0NDcUdTTTQ5QkFNQ0EwY0FNRVFDSUVQSGMzdFNpU0E3CmlOaUo1MlF4akV3TnpXL01ndG5CQWwwR0IxaFFwTDlPQWlBcno0ZE5YbHN6clpxRjBlWjBZZlJONUJXSzhsWjkKSFhTZk4wV0h3ZFBWTkE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
server: https://192.168.64.40:6443
name: default
contexts:
- context:
cluster: default
user: default
name: default
current-context: default
kind: Config
preferences: {}
users:
- name: default
user:
password: de88d1ca405dcfa2e53a1625f92d3862
username: admin
#Use new kubeconfig for kubectl
export KUBECONFIG=$(pwd)/kubeconfig
#Get Pods and see it works like a charm
kubectl get pods -A
# Setup version variable
export KYMA_VERSION=1.6.0
#Get Tiller
kubectl apply -f https://raw.githubusercontent.com/kyma-project/kyma/$KYMA_VERSION/installation/resources/tiller.yaml
#Trigger installation
kubectl apply -f https://github.com/kyma-project/kyma/releases/download/$KYMA_VERSION/kyma-installer-local.yaml
#Installation is in progress and you can see if new pods are showing up in the system or no errors show up in installation
while true; do \
kubectl -n default get installation/kyma-installation -o jsonpath="{'Status: '}{.status.state}{', description: '}{.status.description}"; echo; \
sleep 5; \
done
Read more on Kyma:
#Remove VM with K3s and Kyma
multipass delete k3s --purge