Buildpacks, Docker and Kubernetes
What’s Buildpacks?
Buildpacks creates docker images for your apps with zero config.
How to create docker image with buildpacks?
Install pack
First of all, you must have a pack.
Select a builder
You must decide which builder you will gonna use to build image.
Now you can see list of cool builders.
Build your image
You’ve already decided which builder you’re gonna use. So, now you can build your image.
Now, your docker is image ready…!!!
Push your docker image
You can push your image to container registry.
If you did it successfully, you can see it on the docker hub.
Deploy your docker image to Kubernetes
This is the time to deploy your newly created image.
Create kubernetes objects
We use YAML to create kubernets objects.
Deployment
— Group of pods
NodePort
— Service; It’ll route traffic from port 3001 to host port 8080
Minikube
minikube allows us to set up kubernetes cluster on our daily driver.
Deploy to Kubernetes
After the started minikube, You can deploy your docker to kubernetes.
View the deployment
You can get the list of pods.
You can view the details of each pod.
View the service
You can get the list of services.
You can view the details of each service.
Test the deployment
If you did all the steps successfully, you can visit your web app via the browser.
Don’t forget to stop minikude.
If you have any questions regarding this article, feel free to drop a comment below or tweet.
Reference