Skip to content

orlandovald/k8s-demystified

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8s-demystified

Companion repo for my Kubernetes Demystified talk

Pre-requisites

To run the examples you'll need the below installed in your machine.

  • kubeclt - Kubernetes CLI to interact with a cluster
  • k3d - to run your local Kubernetes cluster in docker

Set up

Create the cluster with the below command,

k3d cluster create --config ./cluster/k8s-demystified.yaml

A k3d cluster named k8s-demystified (as specified in the ./cluster/k8s-demystified.yaml file) will be created and automatically configured in your local ~/.kube/config file. You can verify your kubectl is pointing to your local cluster with the below command.

$ kubectl config current-context

# you can run this at any time to point to your new cluster
$ kubectl config use-context k3d-k8s-demystified

# let's take a look at the Nodes in your cluster
$ kubectl get nodes

Finally, let's create a namespace where we can start creating resources,

# let's create a couple of namespaces
kubectl create namespace redis
kubectl create namespace k8s-demystified

# point to your namespace for all subsequent kubectl commands
kubectl config set-context --current --namespace=k8s-demystified

This finishes the set up. You can continue with the tutorial

Teardown

To delete your local cluster, including all created resources, run the below,

k3d cluster delete k8s-demystified

About

Companion repo to my Kubernetes Demystified talk

Topics

Resources

License

Stars

Watchers

Forks