openfaas / workshop

Learn Serverless for Kubernetes with OpenFaaS
https://www.openfaas.com
MIT License
960 stars 312 forks source link

K3d start new cluster workflow is outdated #183

Closed sergii4 closed 4 years ago

sergii4 commented 4 years ago

That section is outdated and scripts doesn't work anymore

Create a local cluster on your laptop

k3s using k3d

If you have Docker on your computer, then you can use k3d from Rancher Labs. It installs a lightweight version of Kubernetes called k3s and runs it within a Docker container, meaning it will work on any computer that has Docker.

$ k3d create
INFO[0000] Created cluster network with ID 9a7d5887754d3e317b5c1500f706a5ae602077a18bc71bcedb9fae86ebd84c0b 
INFO[0000] Created docker volume  k3d-k3s-default-images 
INFO[0000] Creating cluster [k3s-default]               
INFO[0000] Creating server using docker.io/rancher/k3s:v0.9.1... 
INFO[0000] SUCCESS: created cluster [k3s-default]       

Switch into the k3d context:

export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"
kubectl cluster-info 

Note: You have to run this on any new terminal you open.

Expected Behaviour

Workflow works

Current Behaviour

Workflow doesn't work

Possible Solution

Follow correct flow from k3d

Steps to Reproduce (for bugs)

  1. Try to follow current flow

Context

Your Environment

sergii4 commented 4 years ago

182