K8s Tips & Tricks
Kubernetes (k8s) is an open-source container orchestration system. It automates deployment, scaling, and management of applications in the cloud and on server clusters. K8s provides a standardized platform for managing applications in a multi-node environment and ensures availability, fail tolerance, and resource management.
Note
The site kubernetes.io off5r a really good tutorial explaining the different concepts.
Architecture
It is important to understand the K8s architecture (mainly the networking) to understand how pods/containers/outside world are communicating.
More details in this article.
Utilisation
This section describe some of the main commands to use to manage a K8s Cluster, deploy containers, pods, etc.
Be sure you have install the kubectl
command in your machine (for example with brew install kubectl
on a MAC).
Cluster details
These commands can be useful:
Commands | Description |
---|---|
kubectl cluster-info |
Display the cluster details |
kubectl get nodes |
Show all nodes of the cluster |
Container deployment example
See the demo page
Info
A Deployment provides declarative updates for Pods and ReplicaSets.
Cloud lab
You can play with a K8s Cluster on that website: https://labs.play-with-k8s.com.