Introduction
this is part 31 from the journey it's a long journey(360 day) so go please check previous parts , and if you need to walk in the journey with me please make sure to follow because I may post more than once in 1 Day but surely I will post daily at least one ๐.
And I will cover lot of tools as we move on.
Pods
Today we are going to create a POD, We talk in the Introduction of Kubernetes little about Pods , creating pods is divided in 2 types :
- Imperative : it's mean we write what we need in commands style like args.
- Declarative : it's mean we write what we need in a file and we pass the file as arg. This one is better because it's IAC(instructions as code) so if the pod got corrupted we have all in a configuration file.
We have other commands related to it like delete,etc...
Lab
Let's travel back to docker if you remember in the journey we build an image and push it in part 012 . We are going to use for now.
link
kubectl run first-pod --image=omarelkhatib/app_009_1:latest --restart=Never
- we run it using run (obviously)
- first-pod is the name of the pod
- --image is the profile/name:tag of the docker image (He know that he should get it from docker hub)
- --restart=Never , this we are going to talk about later :)
now to see the pods type
kubectl get pods
Tip
if you are getting an tcp connection error just run minikube
minikube start --driver=virtualbox
this will run minikube and setup Kubernetes to use it.
Top comments (0)