0% found this document useful (0 votes)
2 views7 pages

Devops Cheatsheet Handbook

The Complete DevOps Cheat Sheet Handbook is a concise reference guide that covers essential commands, workflows, and troubleshooting techniques across various DevOps tools and practices. It includes sections on Linux, Git, Networking, Bash scripting, Docker, Kubernetes, Terraform, CI/CD, AWS, Monitoring, DevSecOps, and best practices. This handbook serves as a quick reference for professionals in the DevOps field to streamline their workflows and enhance productivity.

Uploaded by

chandrakant98
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views7 pages

Devops Cheatsheet Handbook

The Complete DevOps Cheat Sheet Handbook is a concise reference guide that covers essential commands, workflows, and troubleshooting techniques across various DevOps tools and practices. It includes sections on Linux, Git, Networking, Bash scripting, Docker, Kubernetes, Terraform, CI/CD, AWS, Monitoring, DevSecOps, and best practices. This handbook serves as a quick reference for professionals in the DevOps field to streamline their workflows and enhance productivity.

Uploaded by

chandrakant98
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Complete DevOps Cheat Sheet Handbook

A compact, text‑only, high‑utility DevOps handbook combining commands, workflows, troubleshooting, and
quick references.

1. Linux Essentials
Basic Commands

ls, cd, pwd, mkdir, rm -rf, cp, mv, touch

Permissions & Ownership

chmod 755 file


chown user:group file

System Info

uname -a
hostnamectl
free -h
df -h

Logs

/var/log/
journalctl -xe

Services

systemctl status service


systemctl restart service

1
2. Git Cheat Sheet
Basics

git clone
git add .
git commit -m "message"
git push
git pull

Branches

git checkout -b feature

Fix common issues

git stash
git reset --hard
git rebase

3. Networking Cheat Sheet


Diagnostics

ping [Link]
traceroute [Link]
ip a
ip route

Ports & Connections

ss -tulnp
netstat -tulnp

DNS

dig [Link]
nslookup [Link]

2
4. Bash Scripting Essentials
Template

#!/bin/bash
for i in {1..5}; do echo $i; done

Variables & Conditions

name="dev"
if [ $name == "dev" ]; then echo yes; fi

5. Docker Cheat Sheet


Common Commands

docker build -t app .


docker run -d -p 80:80 app
docker logs container
docker exec -it container bash

Troubleshooting

docker ps -a
docker inspect container
docker stats

Cleanups

docker system prune -a

6. Kubernetes (K8s) Cheat Sheet


Core Commands

kubectl get pods,svc,deploy


kubectl describe pod <pod>

3
kubectl logs <pod>
kubectl exec -it <pod> -- sh

Apply / Delete

kubectl apply -f [Link]


kubectl delete -f [Link]

Troubleshooting

kubectl get events


kubectl describe node

7. YAML Quick Reference

apiVersion: v1
kind: Pod
metadata:
name: app
spec:
containers:
- name: app
image: nginx

8. Terraform Cheat Sheet


Core Commands

terraform init
terraform plan
terraform apply
terraform destroy

State Management

terraform state list


terraform import

4
Structure

provider "aws" {}
resource "aws_instance" "web" {
ami = "ami-123"
instance_type = "[Link]"
}

9. CI/CD Cheat Sheet


Pipeline Stages

• Build
• Test
• Scan
• Deploy
• Notify

Jenkinsfile Template

pipeline {
stages {
stage('Build'){ steps{ sh 'npm install' }}
}
}

10. AWS Cheat Sheet


EC2

ssh -i [Link] ubuntu@ip


systemctl status

S3

aws s3 ls
aws s3 cp file s3://bucket

CloudWatch

aws logs tail

5
IAM Best Practices

• Least privilege
• MFA enabled
• No root usage

11. Monitoring & Logging


Prometheus

• Exporters
• Metrics scraping
• Alerting rules

Grafana

• Dashboards
• Datasources

12. DevSecOps
Security Tools

• Trivy
• Snyk
• Clair

Best Practices

• Secrets management
• Image scanning
• IAM hardening

13. Advanced Troubleshooting Quick Guide


Docker

docker logs

K8s

kubectl describe

6
AWS

Check SG, NACL, CloudWatch

Terraform

terraform plan

Linux

journalctl -xe

14. DevOps Best Practices


• Automate everything
• Treat infrastructure as code
• Shift-left security
• Implement monitoring early
• Keep things stateless
• Document incident fixes

You might also like