Listen to this Post
🚀 DevOps Cheat Sheet – Essential Commands in One PDF! 🚀
This cheat sheet covers key commands for:
🔹 Git, Docker, Kubernetes, Terraform
🔹 Jenkins, GitHub Actions, GitLab CI/CD
🔹 SonarQube, Trivy, OWASP Dependency-Check
🔹 Linux, Shell Scripting & more!
Practice-Verified Commands and Codes
Git Commands
<h1>Clone a repository</h1> git clone <repository-url> <h1>Check status of the repository</h1> git status <h1>Add files to staging area</h1> git add <file-name> <h1>Commit changes</h1> git commit -m "Your commit message" <h1>Push changes to remote repository</h1> git push origin <branch-name>
Docker Commands
<h1>Build a Docker image</h1> docker build -t <image-name> . <h1>Run a Docker container</h1> docker run -d -p 8080:80 <image-name> <h1>List running containers</h1> docker ps <h1>Stop a container</h1> docker stop <container-id>
Kubernetes Commands
<h1>Create a deployment</h1> kubectl create deployment <deployment-name> --image=<image-name> <h1>Get pods</h1> kubectl get pods <h1>Describe a pod</h1> kubectl describe pod <pod-name> <h1>Apply a configuration file</h1> kubectl apply -f <config-file.yaml>
Terraform Commands
<h1>Initialize Terraform</h1> terraform init <h1>Plan the infrastructure</h1> terraform plan <h1>Apply the infrastructure</h1> terraform apply <h1>Destroy the infrastructure</h1> terraform destroy
Linux Commands
<h1>List files in a directory</h1> ls -la <h1>Search for a file</h1> find /path/to/search -name "filename" <h1>Check disk usage</h1> df -h <h1>Check running processes</h1> top
Shell Scripting
<h1>Example of a simple shell script</h1> #!/bin/bash echo "Hello, World!"
What Undercode Say
The DevOps field is a dynamic and ever-evolving domain that requires a strong grasp of various tools and technologies. This cheat sheet provides a comprehensive overview of essential commands for tools like Git, Docker, Kubernetes, Terraform, Jenkins, and more. Mastering these commands is crucial for automating workflows, managing infrastructure, and ensuring seamless CI/CD pipelines.
For Git, understanding version control is fundamental. Commands like git clone, git commit, and `git push` are the backbone of collaborative development. Docker commands such as `docker build` and `docker run` are essential for containerization, while Kubernetes commands like `kubectl create deployment` and `kubectl get pods` are vital for orchestrating containers at scale.
Terraform commands like terraform init, terraform plan, and `terraform apply` are indispensable for Infrastructure as Code (IaC) practices. Additionally, Linux commands such as ls, find, and `top` are foundational for system administration and troubleshooting.
To further enhance your skills, explore advanced topics like Jenkins pipeline scripting, GitHub Actions workflows, and SonarQube integration for code quality analysis. Continuous learning and hands-on practice are key to excelling in DevOps.
For more resources, check out:
By mastering these tools and commands, you can streamline your DevOps workflows, improve efficiency, and contribute to robust, scalable, and secure systems. Keep experimenting, automating, and optimizing! 🚀
References:
initially reported by: https://www.linkedin.com/posts/swapna-adhav-05075462_devops-cheat-sheet-activity-7300841016754860032-r16z – Hackers Feeds
Extra Hub:
Undercode AI


