k8s_course

(★ 18)

180-The Kubernetes Odyssey: A Multi-Track Journey from Zero to Production Hero Course - Lesson Generation Prompt

File Explorer

  • README.md

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

docker logs

View Details ▼

This command is an alias of `docker container logs`.

tldr docker container logs

View documentation for the original command:

🔍

kind

View Details ▼

Run local Kubernetes clusters using Docker container "nodes".
Designed for testing Kubernetes itself, but may be used for local development or continuous integration.

kind create cluster --name {{cluster_name}}

Create a local Kubernetes cluster:

kind delete clusters {{cluster_name}}

Delete one or more clusters:

kind get {{clusters|nodes|kubeconfig}}

Get details about clusters, nodes, or the kubeconfig:

🔍

kubeadm

View Details ▼

Interface for creating and managing Kubernetes clusters.

kubeadm init

Create a Kubernetes control plane:

kubeadm join --token {{token}}

Bootstrap a Kubernetes worker node and join it to a cluster:

kubeadm token create --ttl {{12h0m0s}}

Create a new bootstrap token with a TTL of 12 hours:

🔍

kubectl describe

View Details ▼

Show details of Kubernetes resources.

kubectl describe {{[po|pods]}} {{[-n|--namespace]}} {{namespace}}

Show details of pods in a namespace:

kubectl describe {{[no|nodes]}} {{[-n|--namespace]}} {{namespace}}

Show details of nodes in a namespace:

kubectl describe {{[po|pods]}} {{pod_name}} {{[-n|--namespace]}} {{namespace}}

Show the details of a specific pod in a namespace:

🔍

kubectl logs

View Details ▼

Show logs for containers in a pod.

kubectl logs {{pod_name}}

Show logs for a single-container pod:

kubectl logs {{[-c|--container]}} {{container_name}} {{pod_name}}

Show logs for a specified container in a pod:

kubectl logs --all-containers={{true}} {{pod_name}}

Show logs for all containers in a pod:

🔍

kubectl port-forward

View Details ▼

Forward one or more local ports to a pod.

kubectl port-forward {{[po|pods]}}/{{pod_name}} 5000 6000

Forward local ports 5000 and 6000 to the pod ports 5000 and 6000:

kubectl port-forward {{[po|pods]}}/{{pod_name}} :5000

Forward a random local port to the pod port 5000:

kubectl port-forward {{[deploy|deployment]}}/{{deployment_name}} 5000 6000

Forward local ports 5000 and 6000 to the deployment ports 5000 and 6000:

🔍

kubectl

View Details ▼

Run commands against Kubernetes clusters.
Some subcommands such as `run` have their own usage documentation.

kubectl get {{pods|service|deployment|ingress|...}} {{[-o|--output]}} wide

List information about a resource with more details:

kubectl label pods {{name}} unhealthy=true

Update specified pod with the label `unhealthy` and the value `true`:

kubectl get all

List all resources with different types:

🔍

trivy

View Details ▼

Scanner for vulnerabilities in container images, filesystems, and Git repositories, as well as for configuration issues.

trivy image {{image:tag}}

Scan a Docker image for vulnerabilities and exposed secrets:

trivy image {{[-s|--severity]}} {{HIGH,CRITICAL}} {{alpine:3.15}}

Scan a Docker image filtering the output by severity:

trivy image --ignore-unfixed {{alpine:3.15}}

Scan a Docker image ignoring any unfixed/unpatched vulnerabilities:

// repository documentation