A Busy Persons Guide for … How to Use The Command Line to Create a Deployment that Runs an NGINX Image. Utilizing the KUBE!!! (part 1)
The Kube, K8’s, or the platform originally known as Kubernetes helps to automate the orchestration of containers! It is open sourced and is used to modify or mange containers, scale and deploy. Our BFF’s at Google actually developed the system and almost everything at Google functions from the use of containers.
So, let’s hop into the project!
Prerequisite:
Docker Desktop (select Dev Environment, the Visual Studio Code will pop up after you have everything installed they'll be a guide informing you what you need)
Kubernetes command knowledge
FOUNDATIONAL
- Using the command line,
create a deployment that runs the nginx image. - Display the details of this deployment
- Check the event logs from the deployment
- Delete the deployment
ADVANCED
(this portion of the project can be FOUND HERE for part 2! yay!)
- Create the same deployment using a yaml file
- Display the details of this deployment via the command line
- Update the yaml file to scale the deployment to 4 nginx containers
- Verify the change via the command line
1. Version Check!
#check to see what version of Kubernetes is installed
kubectl version
2. Create a deployment that runs an NGINX image
kubectl create deployment --image nginx <enter your deployment name here>
3. Deployment Check!
#a check to confirm your deployment is working
kubectl get allOR
#checks to see if you deployment was createdkubectl get deployments
4. Display Pods & Details
#lists of all the pods in the namespaces
kubectl get pods#shows you all the information about the pod
kubectl describe deployment <enter the pod name here>
5. Logs
#displays the activity
kubectl logs deployment/<enter your deployment name here>
6. Delete the deployed pod
kubectl delete deployment <enter deployment name here>
That completes Part 1 of this project! I hope that was a quick and easy guide to follow!
Please check out PART 2 HERE for the advanced portion of this project!
If you ever see anything I forgot or could've use to simplify or even improve my project by all means leave a comment! I love when people drop their own articles or helpful relatable articles in the comment box as well!