Kubernetes: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Kubernetes, also known as K8s, is a container orchestration service by Google. | Kubernetes, also known as K8s, is a container orchestration service by Google. | ||
It supposedly has a harder learning curve than docker-swarm but is heavily inspired by Google's internal [https://research.google/pubs/pub43438/#:~:text=Google's%20Borg%20system%20is%20a,tens%20of%20thousands%20of%20machines. borg system]. | It supposedly has a harder learning curve than docker-swarm but is heavily inspired by Google's internal [https://research.google/pubs/pub43438/#:~:text=Google's%20Borg%20system%20is%20a,tens%20of%20thousands%20of%20machines. borg system]. | ||
==Getting Started== | |||
===Background=== | |||
Kubernetes runs applications across nodes which are physical or virtual machines.<br> | |||
Each node contains a kubelet process, a container runtime (e.g. Docker), and possibly one or more pods.<br> | |||
Pods contain resources needed to host your application including volumes and one or more containers. | |||
===Installation=== | |||
For local development, you can install [https://minikube.sigs.k8s.io/docs/start/ minikube].<br> | |||
Otherwise, install <code>kubeadm</code>. | |||
==kubectl== | |||
===pods=== | |||
<pre> | |||
kubectl get pods | |||
kubectl describe pods | |||
</pre> | |||
===proxy=== | |||
<pre> | |||
kubectl proxy | |||
</pre> | |||
===containers=== | |||
<pre> | |||
kubectl logs $POD_NAME | |||
kubectl exec -it $POD_NAME -- bash | |||
</pre> | |||
===service=== | |||
==Resources== | ==Resources== | ||
* [https://kubernetes.io/docs/tutorials/kubernetes-basics/ Kubernetes Basics] | |||
* [https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615 Scalable Microservices with Kubernetes Udacity Course] | * [https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615 Scalable Microservices with Kubernetes Udacity Course] | ||
** Lesson 2 is on Docker and lessons 3-4 are on Kubernetes. | ** Lesson 2 is on Docker and lessons 3-4 are on Kubernetes. |