The kubeconfig file allows connection to the Kubernetes server.
# Retrieve the k8s cluster authentication filemkdir -p ~/.kube
cp /tmp/config $HOME/.kube/config
chmod 600 $HOME/.kube/config
# Alternate solution, kind specifickind export kubeconfig
# Launch k8s-toolbox interactivelyktbx desk
# Check Kubernetes statuskubectl cluster-info
# Check node statuskubectl get nodes
# Create a namespacekubectl create namespace <ID-first-name>
# Change the current context's active namespacekubens <ID-first-name>
# Create a pod# use "kubectl run --help" to retrieve the correct commandkubectl run <your-pod> ???
# Add a label to the podkubectl label pod <your-pod> tutorial=true
Openshift Access
# inside the toolbox# Retrieve password in /tmp/oc-creds.txtoc login -u kubeadmin https://api.crc.testing:6443
# Watch the clusterkubectl get nodes
# Check you contextkubectx
# Create a namespace <ID-first-name>oc new-project --help
# Check you context againkubectx
# Switch to other context/cluster# kubectx default/api-crc-testing:6443/kubeadmin
Download the Labs
Once in the toolbox, run one of the commands below to download the labs:
# Lab for the "Kubernetes Fundamentals" traininggit clone https://github.com/k8s-school/k8s-school
# Lab for the "Advanced Kubernetes" traininggit clone https://github.com/k8s-school/k8s-advanced
# Lab for the "Advanced OpenShift" traininggit clone https://github.com/k8s-school/openshift-advanced