1707968792418.gif
2.6 MB
ls - List directory contents
cd - Change directory
mkdir - Make directories
rm - Remove files or directories
chmod - Change file mode bits
chown - Change file owner and group
chgrp - Change group ownership of files
ps - Report a snapshot of current processes
kill - Send a signal to a process
top - Display Linux processes
ifconfig - Configure network interfaces
ping - Send ICMP ECHO_REQUEST to network hosts
netstat - Display network connections, routing tables, interface statistics
uname - Display system information
hostname - Display the system's hostname
df - Display disk space usage
apt - Package manager for Debian-based systems
yum - Package manager for RPM-based systems
dpkg - Package manager for Debian-based systems
bash - GNU Bourne-Again SHell
echo - Display a line of text
grep - Search file(s) for lines that match a given pattern
useradd - Create a new user or update default new user information
userdel - Delete a user account and related files
passwd - Change user password
scp - Securely copy files between hosts
rsync - Remote file synchronization
wget - Retrieve files from the web
systemctl - Control the systemd system and service manager
service - Run a System V init script
chkconfig - Tool for enabling and disabling system services
Please open Telegram to view this post
VIEW IN TELEGRAM
If you're a DevOps fresher looking to understand Azure Cloud, here's a brief introduction:
1โฃ . Understanding DevOps:
- DevOps is a set of practices that combines software development (Dev) and IT operations (Ops) to improve collaboration, automate processes, and enhance software delivery.
- It emphasizes continuous integration, continuous delivery, and infrastructure as code.
- DevOps aims to break down silos between development and operations teams, fostering a culture of collaboration and agility.
2โฃ . Key Concepts in DevOps:
โก๏ธ Agile Planning and Lean Project Management: Agile methodologies help manage work efficiently, while lean principles minimize waste.
โก๏ธ Version Control: Use tools like Git to manage code changes and collaborate effectively.
โก๏ธ Continuous Integration (CI): Automate code integration and testing to catch issues early.
โก๏ธ Continuous Delivery (CD): Automate deployment to ensure reliable and frequent releases.
โก๏ธ Infrastructure as Code (IaC): Define infrastructure using code (e.g., ARM templates in Azure).
โก๏ธ Monitoring and Logging: Monitor applications and infrastructure to identify issues promptly.
โก๏ธ Validated Learning: Use data and feedback to improve processes continuously.
3โฃ . Building a DevOps Culture:
- Cultivating a DevOps culture involves more than just tools. It requires changes in team structures, workflows, and habits.
- Encourage collaboration, transparency, and shared responsibility.
- Focus on learning, adaptability, and continuous improvement.
โ ๏ธ Remember, DevOps is about people, processes, and tools working together to deliver high-quality software efficiently. If you'd like to explore further, check out the Microsoft Azure DevOps tutorial for practical steps! ๐ [1]
โก๏ธ Reference links: [1] [2] [3]
๐ฑ ๐๐ผ๐น๐น๐ผ๐ @devcloudninjas ๐๐จ๐ซ ๐ฆ๐จ๐ซ๐ ๐ฌ๐ฎ๐๐ก ๐๐จ๐ง๐ญ๐๐ง๐ญ ๐๐ซ๐จ๐ฎ๐ง๐ ๐๐ฅ๐จ๐ฎ๐ & ๐๐๐ฏ๐๐ฉ๐ฌ!!! // ๐๐จ๐ข๐ง ๐๐จ๐ซ ๐๐๐ฏ๐๐ฉ๐ฌ ๐๐๐๐ฌ: @devcloudninjas
- DevOps is a set of practices that combines software development (Dev) and IT operations (Ops) to improve collaboration, automate processes, and enhance software delivery.
- It emphasizes continuous integration, continuous delivery, and infrastructure as code.
- DevOps aims to break down silos between development and operations teams, fostering a culture of collaboration and agility.
- Cultivating a DevOps culture involves more than just tools. It requires changes in team structures, workflows, and habits.
- Encourage collaboration, transparency, and shared responsibility.
- Focus on learning, adaptability, and continuous improvement.
Please open Telegram to view this post
VIEW IN TELEGRAM
Are you new to DevOps or CI/CD? Want to learn how to automate your development workflow and deliver faster, higher-quality software? Look no further! In my latest post, Iโve broken down everything you need to know about setting up your first CI/CD pipeline from scratch.
- What is CI/CD? โ The difference between Continuous Integration, Continuous Delivery, and Continuous Deployment.
- How to Set Up Your First Pipeline โ Step-by-step guidance on automating builds, tests, and deployments.
- Best Practices โ Learn how to optimize your pipeline for speed and reliability.
- Overcoming Common Challenges โ Tips to avoid potential pitfalls along the way.
Whether youโre just getting started with DevOps or looking to refine your skills, this guide has you covered!
Donโt miss out on this essential guide!๐ฏ Letโs automate and deploy like a pro!๐ช ๐
Please open Telegram to view this post
VIEW IN TELEGRAM
DEV Community
Getting Started with CI/CD: A Beginner's Guide to Automating Your First Pipeline (with Jenkins)
Table of Contents Introduction What is CI/CD? Continuous Integration (CI) Continuous...
Please open Telegram to view this post
VIEW IN TELEGRAM
As a DevOps engineer, we donโt deploy to cloud or servers daily, but most of our time is spent on troubleshooting. Here are some important HTTP status codes every DevOps engineer should know when troubleshooting:
๐ซ Status code 403 Forbidden:
This usually occurs due to user permission issues, like incorrect IAM role or policy assignments.
๐ Status code 404 Resource Not Found:
This typically happens when a route or method is unavailable on API Gateway or the backend server.
โ ๏ธ Status code 502 Bad Gateway:
Occurs when a server acting as a gateway or proxy (e.g., Nginx, Apache, AWS API Gateway) receives an invalid or no response from the upstream server it's trying to communicate with.
โ๏ธ Status code 503 Service Unavailable:
Indicates that the server is temporarily unable to handle the request, often due to overload or maintenance.
โ๏ธ ๐๐ผ๐น๐น๐ผ๐ @devcloudninjas ๐๐จ๐ซ ๐ฆ๐จ๐ซ๐ ๐ฌ๐ฎ๐๐ก ๐๐จ๐ง๐ญ๐๐ง๐ญ ๐๐ซ๐จ๐ฎ๐ง๐ ๐๐ฅ๐จ๐ฎ๐ & ๐๐๐ฏ๐๐ฉ๐ฌ!!! // ๐๐จ๐ข๐ง ๐๐จ๐ซ ๐๐๐ฏ๐๐ฉ๐ฌ ๐๐๐๐ฌ: @devcloudninjas
This usually occurs due to user permission issues, like incorrect IAM role or policy assignments.
This typically happens when a route or method is unavailable on API Gateway or the backend server.
Occurs when a server acting as a gateway or proxy (e.g., Nginx, Apache, AWS API Gateway) receives an invalid or no response from the upstream server it's trying to communicate with.
Indicates that the server is temporarily unable to handle the request, often due to overload or maintenance.
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1
Iโm excited to share new latest project 29: CI/CD Project: Deploy a 3-tier Microservice Voting App using ArgoCD and Azure DevOps Pipeline.
- Setting up a CI/CD pipeline using Azure DevOps
- Automated deployment with ArgoCD
- Scaling a 3-tier Microservice architecture for a Voting App
If youโre into DevOps, Kubernetes, or CI/CD Pipelines, this is for you!
Check out the repo, explore the code, and feel free to reach out if you have any questions. Let's discuss and collaborate!๐
๐ฃ Note: Fork this Repository๐งโ๐ป for upcoming future projects, Every week releases new Project.
Please open Telegram to view this post
VIEW IN TELEGRAM
1727106322516.gif
682 KB
AWS Lambda supports synchronous and asynchronous invocation.
- In synchronous invocation, the caller directly calls the Lambda function using AWS CLI, SDK, or other services.
- In an asynchronous invocation, the caller doesnโt wait for the functionโs response. The request is authorized and an event is placed in an internal SQS queue. Pollers read messages from the queue and send them for processing.
The Assignment Service manages the execution environments.
- The service is written in Rust for high performance and is divided into multiple partitions with a leader-follower approach for high availability.
- The state of execution environments is written to an external journal log.
Firecracker is a lightweight virtual machine manager designed for running serverless workloads such as AWS Lambda and AWS Fargate.
- It uses Linuxโs Kernel-based virtual machine to create and manage secure, fast-booting microVMs.
AWS Lambda also has to manage the state consisting of input data and function code.
- Chunking to store the container images more efficiently.
- Using convergent encryption to secure the shared data. This involves appending additional data to the chunk to compute a more robust hash.
- SnapStart feature to reduce cold start latency by pre-initializing the execution environment
Please open Telegram to view this post
VIEW IN TELEGRAM
1. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ด๐ฒ๐ ๐ฝ๐ผ๐ฑ๐ --๐ฎ๐น๐น-๐ป๐ฎ๐บ๐ฒ๐๐ฝ๐ฎ๐ฐ๐ฒ๐: Check the status of all pods across namespaces to identify failures.
2. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ฑ๐ฒ๐๐ฐ๐ฟ๐ถ๐ฏ๐ฒ ๐ฝ๐ผ๐ฑ ๐ฝ๐ผ๐ฑ_๐ป๐ฎ๐บ๐ฒ: Gather detailed information about a failed pod.
3. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐น๐ผ๐ด๐ ๐ฝ๐ผ๐ฑ_๐ป๐ฎ๐บ๐ฒ -๐ฐ ๐ฐ๐ผ๐ป๐๐ฎ๐ถ๐ป๐ฒ๐ฟ_๐ป๐ฎ๐บ๐ฒ: View logs of a specific container inside a pod to troubleshoot issues.
4. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ด๐ฒ๐ ๐ฒ๐๐ฒ๐ป๐๐ --๐ฎ๐น๐น-๐ป๐ฎ๐บ๐ฒ๐๐ฝ๐ฎ๐ฐ๐ฒ๐ --๐๐ผ๐ฟ๐-๐ฏ๐='.๐บ๐ฒ๐๐ฎ๐ฑ๐ฎ๐๐ฎ.๐ฐ๐ฟ๐ฒ๐ฎ๐๐ถ๐ผ๐ป๐ง๐ถ๐บ๐ฒ๐๐๐ฎ๐บ๐ฝ': Review recent events for clues on crashes and errors.
5. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ด๐ฒ๐ ๐ป๐ผ๐ฑ๐ฒ๐: Verify the status of nodes in the cluster, checking for node failures.
6. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ฑ๐ฟ๐ฎ๐ถ๐ป ๐ป๐ผ๐ฑ๐ฒ_๐ป๐ฎ๐บ๐ฒ --๐ถ๐ด๐ป๐ผ๐ฟ๐ฒ-๐ฑ๐ฎ๐ฒ๐บ๐ผ๐ป๐๐ฒ๐๐: Safely evacuate and cordon a node for recovery operations.
7. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ฐ๐ผ๐ฟ๐ฑ๐ผ๐ป ๐ป๐ผ๐ฑ๐ฒ_๐ป๐ฎ๐บ๐ฒ: Mark a node as unschedulable to prevent new pods from being scheduled during recovery.
8. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ฑ๐ฒ๐น๐ฒ๐๐ฒ ๐ฝ๐ผ๐ฑ ๐ฝ๐ผ๐ฑ_๐ป๐ฎ๐บ๐ฒ --๐ด๐ฟ๐ฎ๐ฐ๐ฒ-๐ฝ๐ฒ๐ฟ๐ถ๐ผ๐ฑ=0 --๐ณ๐ผ๐ฟ๐ฐ๐ฒ: Forcefully delete a crashed pod to restart it or clear it for recovery.
9. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ฟ๐ผ๐น๐น๐ผ๐๐ ๐๐ป๐ฑ๐ผ ๐ฑ๐ฒ๐ฝ๐น๐ผ๐๐บ๐ฒ๐ป๐ ๐ฑ๐ฒ๐ฝ๐น๐ผ๐๐บ๐ฒ๐ป๐_๐ป๐ฎ๐บ๐ฒ: Roll back a deployment in case a new rollout causes crashes.
10. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ฒ๐ ๐ฒ๐ฐ -๐ถ๐ ๐ฝ๐ผ๐ฑ_๐ป๐ฎ๐บ๐ฒ -- /๐ฏ๐ถ๐ป/๐๐ต: Access a container to debug and resolve application issues directly inside the pod.
11. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ด๐ฒ๐ ๐ฐ๐ผ๐บ๐ฝ๐ผ๐ป๐ฒ๐ป๐๐๐๐ฎ๐๐๐๐ฒ๐: Check the health of core cluster components like etcd, kube-apiserver, and more.
12. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐๐ผ๐ฝ ๐ป๐ผ๐ฑ๐ฒ๐: Monitor node resource usage to detect resource exhaustion causing crashes.
13. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐๐ผ๐ฝ ๐ฝ๐ผ๐ฑ๐ --๐ฎ๐น๐น-๐ป๐ฎ๐บ๐ฒ๐๐ฝ๐ฎ๐ฐ๐ฒ๐: Check pod resource usage across namespaces, identifying bottlenecks leading to crashes.
14. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ฑ๐ฒ๐น๐ฒ๐๐ฒ ๐ป๐ผ๐ฑ๐ฒ ๐ป๐ผ๐ฑ๐ฒ_๐ป๐ฎ๐บ๐ฒ: Remove a failed node from the cluster to allow recovery operations.
15. ๐ฒ๐๐ฐ๐ฑ๐ฐ๐๐น --๐ฒ๐ป๐ฑ๐ฝ๐ผ๐ถ๐ป๐๐=๐ต๐๐๐ฝ๐://๐ฒ๐๐ฐ๐ฑ-๐๐ฒ๐ฟ๐๐ฒ๐ฟ:2379 ๐๐ป๐ฎ๐ฝ๐๐ต๐ผ๐ ๐ฟ๐ฒ๐๐๐ผ๐ฟ๐ฒ ๐ฏ๐ฎ๐ฐ๐ธ๐๐ฝ.๐ฑ๐ฏ: Restore etcd from a snapshot in case of etcd failure.
16. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ฎ๐ฝ๐ฝ๐น๐ -๐ณ ๐ฏ๐ฎ๐ฐ๐ธ๐๐ฝ.๐๐ฎ๐บ๐น: Reapply configurations from a backup manifest during recovery.
17. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐๐ฎ๐ถ๐ป๐ ๐ป๐ผ๐ฑ๐ฒ๐ ๐ป๐ผ๐ฑ๐ฒ_๐ป๐ฎ๐บ๐ฒ ๐ธ๐ฒ๐=๐๐ฎ๐น๐๐ฒ:๐ก๐ผ๐ฆ๐ฐ๐ต๐ฒ๐ฑ๐๐น๐ฒ: Prevent scheduling on a node experiencing issues during recovery.
18. ๐ธ๐๐ฏ๐ฒ๐ฐ๐๐น ๐ด๐ฒ๐ ๐ฒ๐ป๐ฑ๐ฝ๐ผ๐ถ๐ป๐๐ ๐๐ฒ๐ฟ๐๐ถ๐ฐ๐ฒ_๐ป๐ฎ๐บ๐ฒ: Verify service endpoints during recovery to ensure services are resolving correctly.
Please open Telegram to view this post
VIEW IN TELEGRAM
Development โ Pre-PROD โ Production
Please open Telegram to view this post
VIEW IN TELEGRAM
Master DevOps โพ from Beginner to Expert
โก๏ธ Start with foundational skills like Version Control (Git), Automating Builds (CI), and Infrastructure as Code (IaC). Get hands-on with Docker, cloud basics, and deployment automation, while also covering basic monitoring and documentation.
โก๏ธ Progress to intermediate activities by mastering CI/CD pipelines, advanced scripting, and container orchestration with Kubernetes. Dive into advanced monitoring tools like ELK and Grafana, and focus on security, performance optimization, database automation, and knowledge sharing.
โก๏ธ Achieve advanced proficiency with enterprise CI/CD, advanced security measures, and Kubernetes optimization. Enhance your skills in advanced monitoring & analytics, cloud strategies, disaster recovery planning, and cross-team collaboration.
โก๏ธ Reach expert status with a focus on architecture design, AI/ML automation, and regulatory compliance. Lead with continuous improvement, strategic planning, vendor management, and executive communication. Develop your expertise in mentorship, leadership, and thought leadership.
๐ฑ ๐
๐จ๐ฅ๐ฅ๐จ๐ฐ @devcloudninjas ๐๐จ๐ซ ๐ฆ๐จ๐ซ๐ ๐ฌ๐ฎ๐๐ก ๐๐จ๐ง๐ญ๐๐ง๐ญ ๐๐ซ๐จ๐ฎ๐ง๐ ๐๐ฅ๐จ๐ฎ๐ & ๐๐๐ฏ๐๐ฉ๐ฌ!!! // ๐๐จ๐ข๐ง ๐๐จ๐ซ ๐๐๐ฏ๐๐ฉ๐ฌ ๐๐๐๐ฌ: @devcloudninjas
Please open Telegram to view this post
VIEW IN TELEGRAM
Master DevOps โพ from Beginner to Expert
โก๏ธ Start with foundational skills like Version Control (Git), Automating Builds (CI), and Infrastructure as Code (IaC). Get hands-on with Docker, cloud basics, and deployment automation, while also covering basic monitoring and documentation.
โก๏ธ Progress to intermediate activities by mastering CI/CD pipelines, advanced scripting, and container orchestration with Kubernetes. Dive into advanced monitoring tools like ELK and Grafana, and focus on security, performance optimization, database automation, and knowledge sharing.
โก๏ธ Achieve advanced proficiency with enterprise CI/CD, advanced security measures, and Kubernetes optimization. Enhance your skills in advanced monitoring & analytics, cloud strategies, disaster recovery planning, and cross-team collaboration.
โก๏ธ Reach expert status with a focus on architecture design, AI/ML automation, and regulatory compliance. Lead with continuous improvement, strategic planning, vendor management, and executive communication. Develop your expertise in mentorship, leadership, and thought leadership.
๐ฑ ๐
๐จ๐ฅ๐ฅ๐จ๐ฐ @devcloudninjas ๐๐จ๐ซ ๐ฆ๐จ๐ซ๐ ๐ฌ๐ฎ๐๐ก ๐๐จ๐ง๐ญ๐๐ง๐ญ ๐๐ซ๐จ๐ฎ๐ง๐ ๐๐ฅ๐จ๐ฎ๐ & ๐๐๐ฏ๐๐ฉ๐ฌ!!! // ๐๐จ๐ข๐ง ๐๐จ๐ซ ๐๐๐ฏ๐๐ฉ๐ฌ ๐๐๐๐ฌ: @devcloudninjas
Please open Telegram to view this post
VIEW IN TELEGRAM
We just published an in-depth AWS DevOps project guide that walks you through setting up a CI/CD pipeline for a containerized Node.js application deployed on AWS ECS Fargate. This tutorial covers everything from creating Docker images, pushing to Amazon ECR, setting up a managed database with Amazon RDS, and automating deployments using AWS CodePipeline.
1. Containerizing a Node.js app with Docker
2. Deploying to AWS ECS Fargate without worrying about servers
3. Automating your CI/CD pipeline with AWS CodePipeline and CodeBuild
4. Managing your database with Amazon RDS
5. Real-time monitoring and logging with AWS CloudWatch
Don't forget to
Please open Telegram to view this post
VIEW IN TELEGRAM
DEV Community
End-to-End AWS DevOps Project: CI/CD Pipeline for ECS Fargate with ECR and RDS
This project provides a comprehensive guide for deploying a containerized application on AWS ECS...
Connect
Please open Telegram to view this post
VIEW IN TELEGRAM
1. How would you ensure that a specific package is installed on multiple servers?
Answer: You can use the package module in a playbook to ensure that a specific package is installed across multiple servers.
2. How do you handle different environments (development, testing, production) with Ansible?
Answer: You can manage different environments by using inventory files and group variables. Create separate inventory files for each environment and use group variables to specify environment-specific configurations. Each hosts file would define the servers for that specific environment, and you can create a group_vars directory for each environment.
3. How would you restart a service after updating a configuration file?
Answer: You can use the notify feature in Ansible to restart a service after a configuration file is updated.
4. How can you ensure idempotency in your Ansible playbook?
Answer: Ansible modules are designed to be idempotent, meaning they can be run multiple times without changing the result beyond the initial application. For instance, if you use the file module to create a file, Ansible will check if the file already exists before trying to create it.
5. How do you handle secrets or sensitive data in Ansible?
Answer: You can handle sensitive data using Ansible Vault, which allows you to encrypt files or variables.
6. Can you explain how you would deploy an application using Ansible?
Answer: Define Inventory: Create an inventory file with the target hosts.
Create a Playbook: Write a playbook that includes tasks for pulling the application code from a repository, installing dependencies, configuring files, and starting services.
7. How would you handle task failures and retries in Ansible?
Answer: You can use the retry and when directives to handle task failures in Ansible. The retries and delay parameters can be specified for tasks that might need to be retried.
8. How would you roll back a deployment if the new version fails?
Answer: To roll back a deployment, you can maintain a previous version of the application and use a playbook that checks the health of the new version before deciding to switch back.
9. How can you manage firewall rules across multiple servers using Ansible?
Answer: You can use the firewalld or iptables modules to manage firewall rules.
10. How do you implement a continuous deployment pipeline using Ansible?
Answer: To implement a continuous deployment pipeline, you can integrate Ansible with a CI/CD tool like Jenkins, GitLab CI, or GitHub Actions.
11. How can you check if a file exists and create it if it doesn't?
Answer: You can use the stat module to check if a file exists and then use the copy or template module to create it if it doesnโt.
12. How can you execute a command on remote hosts and capture its output?
Answer: You can use the command or shell module to run commands on remote hosts and register the output
Please open Telegram to view this post
VIEW IN TELEGRAM
โธ Kubernetes Architecture: Key Components ๐ฑ
โจ Master Node: Manages the cluster, handling the control plane components.
๐ API Server: Frontend for Kubernetes, handling all communication.
๐ Scheduler: Assigns pods to nodes based on resource availability.
๐ Controller Manager: Manages cluster state, scaling, and node health.
๐ etcd: Distributed key-value store for all cluster data.
โจ Worker Nodes: Run application workloads.
๐ Kubelet: Ensures containers are running as defined in Pod specs.
๐ Kube-Proxy: Manages network rules, allowing communication inside/outside the cluster.
๐ Container Runtime: Runs containers (e.g., Docker, containerd).
๐ Pods: Smallest deployable unit, encapsulating containers.
๐ Services: Stable endpoint for connecting to Pods.
๐ Namespaces: Logical partitioning of resources for isolation.
๐ฑ ๐๐ผ๐น๐น๐ผ๐ @devcloudninjas ๐๐จ๐ซ ๐ฆ๐จ๐ซ๐ ๐ฌ๐ฎ๐๐ก ๐๐จ๐ง๐ญ๐๐ง๐ญ ๐๐ซ๐จ๐ฎ๐ง๐ ๐๐ฅ๐จ๐ฎ๐ & ๐๐๐ฏ๐๐ฉ๐ฌ!!! // ๐๐จ๐ข๐ง ๐๐จ๐ซ ๐๐๐ฏ๐๐ฉ๐ฌ ๐๐๐๐ฌ: @devcloudninjas
This architecture ensures efficient scaling, fault tolerance, and high availability for cloud-native applications.
Please open Telegram to view this post
VIEW IN TELEGRAM
๐1
kubectl create -f <replicaset-definition.yaml>: Create a ReplicaSet.kubectl get replicasets: List all ReplicaSets.kubectl describe replicaset <replicaset-name>: Describe a specific ReplicaSet.kubectl scale replicaset <replicaset-name> โreplicas=<replica-count>: Scale a ReplicaSet.kubectl create service <service-type> <service-name> โtcp=<port>: Create a service.kubectl get services: List all services.kubectl expose deployment <deployment-name> โport=<port>: Expose a deployment as a service.kubectl describe service <service-name>: Describe a specific service.kubectl delete service <service-name>: Delete a service.kubectl get endpoints <service-name>: Get information about a service.kubectl create configmap <config-map-name> โfrom-file=<path-to-file>: Create a config map from a file.kubectl create secret <secret-type> <secret-name> โfrom-literal=<key>=<value>: Create a secret.kubectl get configmaps: List all config maps.kubectl get secrets: List all secrets.kubectl describe configmap <config-map-name>: Describe a specific config map.kubectl describe secret <secret-name>: Describe a specific secret.kubectl delete secret <secret_name>: Delete a specific secret.kubectl delete configmap <config-map-name>: Delete a specific config map.kubectl port-forward <pod-name> <local-port>:<pod-port>: Port forward to a pod.kubectl expose deployment <deployment-name> โtype=NodePort โport=<port>: Expose a deployment as a NodePort service.kubectl create ingress <ingress-name> โrule=<host>/<path>=<service-name> โ<service-port>: Create an Ingress resource.kubectl describe ingress <ingress-name>: Get information about an Ingress.kubectl get ingress <ingress-name> -o jsonpath='{.spec.rules[0].host}โ: Retrieves the most value from the first rule of the specified Ingress resource.kubectl create -f <persistent-volume-definition.yaml>: Create a PersistentVolume.kubectl get pv: List all PersistentVolumes.kubectl describe pv <pv-name>: Describe a specific PersistentVolume.kubectl create -f <persistent-volume-claim-definition.yaml>: Create a PersistentVolumeClaim.kubectl get pvc: List all PersistentVolumeClaims.kubectl describe pvc <pvc-name>: Describe a specific PersistentVolumeClaim.kubectl create -f <statefulset-definition.yaml>: Create a StatefulSet.kubectl get statefulsets: List all StatefulSets.kubectl describe statefulset <statefulset-name>: Describe a specific StatefulSet.kubectl scale statefulset <statefulset-name> โreplicas=<replica-count>: Scale a StatefulSet.kubectl get events: Check cluster events.kubectl get component statuses: Get cluster component statuses.kubectl top nodes: Get resource utilization of nodes.kubectl top pods: Get resource utilization of pods.kubectl debug <pod-name> -it โimage=<debugging-image>: Enable container shell access debugging.Please open Telegram to view this post
VIEW IN TELEGRAM
Are you ready to unlock the power of Ansible and boost your DevOps workflows? Here's a quick breakdown of the core concepts, tips, and tricks to get you on the right path to efficient automation.
๐ฃ๐น๐ฎ๐๐ฏ๐ผ๐ผ๐ธ๐
YAML files where automation lives! Write them to describe the desired state of your infrastructure.
๐ง๐ถ๐ฝ: Keep them simple and modular for readability.
๐๐ป๐๐ฒ๐ป๐๐ผ๐ฟ๐ถ๐ฒ๐
Define your hosts and groups of servers here.
๐ง๐ถ๐ฝ: Use dynamic inventory scripts for cloud platforms like AWS to stay updated.
๐ ๐ผ๐ฑ๐๐น๐ฒ๐
Predefined functions that automate tasks like installing packages, copying files, etc.
๐ง๐ถ๐ฝ: Make use of idempotent modules to ensure consistent results!
๐ฅ๐ผ๐น๐ฒ๐ ๐๏ธ
Group related tasks, variables, and handlers in roles to keep things organized.
๐ง๐ถ๐ฝ: Share your roles with others through Ansible Galaxy.
๐๐ฎ๐ป๐ฑ๐น๐ฒ๐ฟ๐
Respond to changes and only run tasks when necessary.
๐ง๐ถ๐ฝ: Use handlers to restart services or trigger additional tasks, minimizing downtime.
๐๐๐ผ๐ถ๐ฑ ๐๐ฎ๐ฟ๐ฑ๐ฐ๐ผ๐ฑ๐ถ๐ป๐ด โ: Use variables and parameterize your playbooks to keep them flexible.
๐จ๐๐ฒ ๐ง๐ฎ๐ด๐ ๐ท๏ธ: Assign tags to tasks and run specific parts of playbooks without executing everything.
๐๐ฟ๐ ๐ฅ๐๐ป (๐๐ต๐ฒ๐ฐ๐ธ ๐ ๐ผ๐ฑ๐ฒ)
๐ฌ๐๐ ๐ ๐๐ผ๐ฟ๐บ๐ฎ๐๐๐ถ๐ป๐ด ๐๏ธ: Stick to best YAML practices for indentation and structureโAnsible is strict about it!
๐ฃ๐ฟ๐ผ๐ฏ๐น๐ฒ๐บ: Configuring 100 EC2 instances with different setups manually is tedious and error-prone.
๐๐ฐ๐๐ถ๐ผ๐ป: Create a dynamic inventory, use roles to define common configurations, and execute your playbook across all instances.
๐ฅ๐ฒ๐๐๐น๐: Successfully ๐ฐ๐ผ๐ป๐ณ๐ถ๐ด๐๐ฟ๐ฒ๐ฑ ๐ฎ๐น๐น ๐ญ๐ฌ๐ฌ ๐ถ๐ป๐๐๐ฎ๐ป๐ฐ๐ฒ๐ ๐ถ๐ป ๐บ๐ถ๐ป๐๐๐ฒ๐ ๐๐ถ๐๐ต ๐๐ฒ๐ฟ๐ผ ๐บ๐ฎ๐ป๐๐ฎ๐น ๐ฒ๐ฟ๐ฟ๐ผ๐ฟ๐.
๐๐ด๐ฒ๐ป๐๐น๐ฒ๐๐: No need to install agents on nodes.
๐๐ฑ๐ฒ๐บ๐ฝ๐ผ๐๐ฒ๐ป๐ฐ๐: Ensures tasks are executed exactly as intended.
๐ฆ๐ฐ๐ฎ๐น๐ฎ๐ฏ๐ถ๐น๐ถ๐๐: Perfect for small to large infrastructures.
๐ Action Time! If you want to streamline your DevOps automation and master Ansible, start now!
Please open Telegram to view this post
VIEW IN TELEGRAM
1711255043413.gif
2.3 MB
While CICD gets thrown around a lot, it actually refers to two separate practices that work together in the software development lifecycle: Continuous Integration (CI) and Continuous Delivery/Deployment (CD).
Here's a quick breakdown:
Here's the key difference:
Please open Telegram to view this post
VIEW IN TELEGRAM