🍊 k8s means kubernetes. Why? There are 8 letters from k to s
Key concepts (extracted from k8s docs):
- Pods Pods are the smallest deployable units of computing that you can create and manage in Kubernetes. A Pod (as in a pod of whales or pea pod) is a group of one or more containers, with shared storage and network resources, and a specification for how to run the containers. A Pod's contents are always co-located and co-scheduled, and run in a shared context. A Pod models an application-specific "logical host": it contains one or more application containers which are relatively tightly coupled. In non-cloud contexts, applications executed on the same physical or virtual machine are analogous to cloud applications executed on the same logical host.
- Services An abstract way to expose an application running on a set of Pods as a network service. With Kubernetes you don't need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.
- Deployments A Deployment provides declarative updates for Pods and ReplicaSets. You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.
kind create cluster
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.20.2) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
-
kubectl get <resource>
-
kubectl cluster-info
-
kubectl proxy
-
Upload image to
kind
cluster:kind load docker-image <image_name>
-
Apply/Create a resource in the cluster from a file:
kubectl apply -f
- First run
kubectl proxy
and access dashboard: [http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login] - Create a sample user and a token to enter the cluster dashboard: https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md
curl http://localhost:8001/api/v1/namespaces/default/services/service-core-code-school:http/proxy/
kubectl set image deployments/core-deployment core-app-container=demo:latest
- [https://kind.sigs.k8s.io/docs/user/quick-start/]
- [https://kubernetes.io/docs/tasks/tools/]
- [https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/]
- [https://iximiuz.com/en/posts/kubernetes-kind-load-docker-image/]
- [https://github.com/derailed/k9s]
- [https://kubernetes.io/docs/tasks/administer-cluster/access-cluster-services/#manually-constructing-apiserver-proxy-urls]
- [https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/]
- If you need some relaxing music when using kubernetes, here's our playlist: https://open.spotify.com/playlist/6qhumsqGJa40xTVZEYnbQJ?si=3a18e9f83e0a42d7