13 𝐦𝐨𝐬𝐭 𝐜𝐨𝐦𝐦𝐨𝐧𝐥𝐲 𝐮𝐬𝐞𝐝 𝐜𝐨𝐦𝐦𝐚𝐧𝐝 𝐟𝐨𝐫 𝐊𝐮𝐛𝐞𝐫𝐧𝐞𝐭𝐞𝐬 🎯
Here are 13 of the most commonly used kubectl commands for managing a real production Kubernetes environment, along with explanations and common use cases:
✅ 𝐂𝐨𝐫𝐞 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭
#1 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐠𝐞𝐭
→
→
→
→
#2 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐝𝐞𝐬𝐜𝐫𝐢𝐛𝐞
→
→
#3 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐜𝐫𝐞𝐚𝐭𝐞
→ kubectl create -f my-deployment.yaml
#4 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐚𝐩𝐩𝐥𝐲
→
#5 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐝𝐞𝐥𝐞𝐭𝐞
→
→
✅ Debugging and Troubleshooting
#6 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐥𝐨𝐠𝐬
→
→
#7 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐞𝐱𝐞𝐜
→
#8 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐩𝐨𝐫𝐭-𝐟𝐨𝐫𝐰𝐚𝐫𝐝
→
#9 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐭𝐨𝐩
→
→
#10 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐞𝐱𝐩𝐥𝐚𝐢𝐧
→
→
✅ Managing Workloads
#11 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐫𝐨𝐥𝐥𝐨𝐮𝐭
→
→
#12 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐬𝐜𝐚𝐥𝐞
→
#13 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐞𝐝𝐢𝐭
→
⚡️ 𝐅𝐨𝐥𝐥𝐨𝐰 @devcloudninjas 𝐟𝐨𝐫 𝐦𝐨𝐫𝐞 𝐬𝐮𝐜𝐡 𝐜𝐨𝐧𝐭𝐞𝐧𝐭 𝐚𝐫𝐨𝐮𝐧𝐝 𝐜𝐥𝐨𝐮𝐝 & 𝐃𝐞𝐯𝐎𝐩𝐬!!! // 𝐉𝐨𝐢𝐧 𝐟𝐨𝐫 𝐃𝐞𝐯𝐎𝐩𝐬 𝐃𝐎𝐂𝐬: @devcloudninjas
Here are 13 of the most commonly used kubectl commands for managing a real production Kubernetes environment, along with explanations and common use cases:
#1 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐠𝐞𝐭
→
kubectl get pods (list pods)→
kubectl get deployments (list deployments)→
kubectl get services (list services)→
kubectl get all (list most resources in a namespace)#2 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐝𝐞𝐬𝐜𝐫𝐢𝐛𝐞
→
kubectl describe pod my-pod→
kubectl describe node my-node#3 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐜𝐫𝐞𝐚𝐭𝐞
→ kubectl create -f my-deployment.yaml
#4 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐚𝐩𝐩𝐥𝐲
→
kubectl apply -f my-deployment.yaml (apply a deployment definition)#5 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐝𝐞𝐥𝐞𝐭𝐞
→
kubectl delete pod my-pod→
kubectl delete service my-service#6 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐥𝐨𝐠𝐬
→
kubectl logs my-pod→
kubectl logs my-pod -c my-container (specify a container)#7 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐞𝐱𝐞𝐜
→
kubectl exec -it my-pod -- bash (interactive shell)#8 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐩𝐨𝐫𝐭-𝐟𝐨𝐫𝐰𝐚𝐫𝐝
→
kubectl port-forward my-pod 8080:80#9 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐭𝐨𝐩
→
kubectl top pod (pod resource usage) →
kubectl top node (node resource usage)#10 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐞𝐱𝐩𝐥𝐚𝐢𝐧
→
kubectl explain pod →
kubectl explain pod.spec (more specific)#11 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐫𝐨𝐥𝐥𝐨𝐮𝐭
→
kubectl rollout status deployment/my-deployment →
kubectl rollout undo deployment/my-deployment
#12 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐬𝐜𝐚𝐥𝐞
→
kubectl scale deployment/my-deployment --replicas=5#13 𝐤𝐮𝐛𝐞𝐜𝐭𝐥 𝐞𝐝𝐢𝐭
→
kubectl edit deployment my-deploymentPlease open Telegram to view this post
VIEW IN TELEGRAM
❤2
1712476913889.gif
171.8 KB
𝟏 . 𝐂𝐨𝐧𝐭𝐢𝐧𝐮𝐨𝐮𝐬 𝐈𝐧𝐭𝐞𝐠𝐫𝐚𝐭𝐢𝐨𝐧.
----------------------------------------------------------------------------------
𝟐. 𝐂𝐨𝐧𝐭𝐢𝐧𝐮𝐨𝐮𝐬 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
----------------------------------------------------------------------------------
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2
A Dockerfile is essentially a set of instructions that Docker follows to build a Docker image. These instructions specify what operating system to use, what software packages to install, what files to copy into the container, what environment variables to set, and what commands to run when the container starts.
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
The right tools make teams more productive, applications more resilient, and organizations more innovative.
Here are some of the most impactful DevOps tools I recommend learning in
I aim to provide actionable insights on leading tools so you can advance your skills efficiently.
Please open Telegram to view this post
VIEW IN TELEGRAM
❤1👍1
Here are the main Azure CLI command groups:
1. Account
-
-
-
-
-
2. AD
-
-
-
-
-
3. Advisor
-
-
4. Aks
-
-
-
-
-
-
-
-
-
5. Api
-
-
-
-
-
-
6. Appconfig
-
-
-
-
-
-
7. Appservice
-
-
-
-
-
-
8. Backup
-
-
-
-
-
-
-
-
9. Batch
-
-
-
-
-
-
-
10. Billing
-
-
-
-
-
-
-
...and many more! You can use
Some other commonly used Azure CLI commands include:
-
-
-
-
-
📱 𝐅𝐨𝐥𝐥𝐨𝐰 @devcloudninjas 𝐟𝐨𝐫 𝐦𝐨𝐫𝐞 𝐬𝐮𝐜𝐡 𝐜𝐨𝐧𝐭𝐞𝐧𝐭 𝐚𝐫𝐨𝐮𝐧𝐝 𝐜𝐥𝐨𝐮𝐝 & 𝐃𝐞𝐯𝐎𝐩𝐬!!! // 𝐉𝐨𝐢𝐧 𝐟𝐨𝐫 𝐃𝐞𝐯𝐎𝐩𝐬 𝐃𝐎𝐂𝐬: @devcloudninjas
1. Account
-
az account-
az account clear-
az account list-
az account show-
az account set2. AD
-
az ad-
az ad app-
az ad group-
az ad sp-
az ad user3. Advisor
-
az advisor-
az advisor recommendation4. Aks
-
az aks-
az aks browse-
az aks create-
az aks delete-
az aks get-credentials-
az aks list-
az aks scale-
az aks show-
az aks update5. Api
-
az api-
az api create-
az api delete-
az api list-
az api show-
az api update6. Appconfig
-
az appconfig-
az appconfig create-
az appconfig delete-
az appconfig list-
az appconfig show-
az appconfig update7. Appservice
-
az appservice-
az appservice create-
az appservice delete-
az appservice list-
az appservice show-
az appservice update8. Backup
-
az backup-
az backup container-
az backup item-
az backup job-
az backup policy-
az backup protected-item-
az backup recovery-point-
az backup vault9. Batch
-
az batch-
az batch account-
az batch application-
az batch certificate-
az batch job-
az batch node-
az batch pool10. Billing
-
az billing-
az billing account-
az billing enrollment-account-
az billing invoice-
az billing period-
az billing profile-
az billing subscription...and many more! You can use
az --help to explore more command groups and commands.Some other commonly used Azure CLI commands include:
-
az group: Manage resource groups-
az resource: Manage resources-
az storage: Manage storage accounts-
az vm: Manage virtual machines-
az network: Manage network resourcesRemember to use az --help to get more information about each command and its usagePlease open Telegram to view this post
VIEW IN TELEGRAM
- All Kubernetes Content
- Kubernetes Realtime scenarios
- All Kubernetes Exercises with solutions
- No More AWS PDFs needed
- Easy to Learn from anywhere
- Detailed Explanation guide
- All Kubernetes Tricks & Techniques for DevOps guy
- Added Certified Kubernetes Administrator (CKA) Notes
- All Kubernetes Realtime examples included
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2
1. Morning Standup Meeting:
- Participate in a daily scrum meeting to discuss progress, blockers, and plans for the day.
2. Code Review and Integration:
- Review code changes submitted by developers.
- Ensure seamless integration by merging code into the main branch.
3. CI/CD Pipeline Management:
- Monitor and manage Continuous Integration/Continuous Deployment pipelines.
- Fix any issues that arise in automated build and deployment processes.
4. Infrastructure as Code (IaC):
- Write and update scripts using tools like Terraform or CloudFormation.
- Provision and configure cloud resources programmatically.
5. Container Management:
- Build, test, and deploy Docker containers.
- Manage Kubernetes clusters for container orchestration.
6. Monitoring and Incident Response:
- Use tools like Prometheus and Grafana for system monitoring.
- Respond to alerts and troubleshoot issues to maintain system uptime.
7. Configuration Management:
- Automate configuration tasks with Ansible, Chef, or Puppet.
- Ensure consistency across development, testing, and production environments.
8. Collaboration and Communication:
- Work closely with developers, QA, and operations teams.
- Communicate effectively to resolve issues and implement new features.
9. Continuous Improvement:
- Analyze system performance and identify areas for improvement.
- Implement best practices for security, scalability, and efficiency.
10. Learning and Development:
- Stay updated with the latest tools, technologies, and industry trends.
- Participate in training sessions and attend webinars/conferences.
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
❤1👍1
Docker 🐬 & Containers All End-to-End Content 2024 ❤️
⚡️ This Includes:
- All Docker-Containers Content
- Docker Realtime scenarios
- All Docker Exercises with solutions
- No More Docker PDFs needed
- Easy to Learn from anywhere
- Detailed Explanation guide
- All Docker file examples for DevOps Engineer
📱 Link : https://github.com/devcloudninjas/into-the-devops/tree/master/topics/containers
📱 𝐅𝐨𝐥𝐥𝐨𝐰 @devcloudninjas 𝐟𝐨𝐫 𝐦𝐨𝐫𝐞 𝐬𝐮𝐜𝐡 𝐜𝐨𝐧𝐭𝐞𝐧𝐭 𝐚𝐫𝐨𝐮𝐧𝐝 𝐜𝐥𝐨𝐮𝐝 & 𝐃𝐞𝐯𝐎𝐩𝐬!!! // 𝐉𝐨𝐢𝐧 𝐟𝐨𝐫 𝐃𝐞𝐯𝐎𝐩𝐬 𝐃𝐎𝐂𝐬: @devcloudninjas
- All Docker-Containers Content
- Docker Realtime scenarios
- All Docker Exercises with solutions
- No More Docker PDFs needed
- Easy to Learn from anywhere
- Detailed Explanation guide
- All Docker file examples for DevOps Engineer
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2❤1
- All Git/GitHub Content with use cases
- Git Realtime scenarios
- All Git/GitHub Exercises with solutions
- No More Git PDFs needed
- Easy to Learn from anywhere
- Detailed Explanation guide
- All Git/GitHub Branching Strategies for DevOps guy
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2👏1
Please open Telegram to view this post
VIEW IN TELEGRAM
👍3
- 40% Scripting automation
- 30% Cloud deployments
- 20% Monitoring and optimizing
- 10% Team collaboration
- 20% Scripting automation
- 25% Cloud deployments
- 15% Monitoring and optimizing
- 40% Team collaboration
- 65.73% Debating on the infra/tool choices
- On-demand support
- Many alignment meetings
- Managing system incidents
- Balancing cost-efficiency
- Technical review sessions
- Cross-department collaboration
- Defending infrastructure choices
- Implementing stakeholder feedback
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
photo_2024-10-16_19-47-04.jpg
63.5 KB
Writing a Kubernetes manifest isn't just about copying and modifying it. Security should be at the core.
This is just one example; there's much more to consider. You can't get this directly from the documentation. You have to dig deep and pull together the necessary information to produce a secure Kubernetes manifest.
📱 𝐅𝐨𝐥𝐥𝐨𝐰 @devcloudninjas 𝐟𝐨𝐫 𝐦𝐨𝐫𝐞 𝐬𝐮𝐜𝐡 𝐜𝐨𝐧𝐭𝐞𝐧𝐭 𝐚𝐫𝐨𝐮𝐧𝐝 𝐜𝐥𝐨𝐮𝐝 & 𝐃𝐞𝐯𝐎𝐩𝐬!!!
Some DevOps engineers don't know how to write a Kubernetes manifest that address to best security practices.
This is just one example; there's much more to consider. You can't get this directly from the documentation. You have to dig deep and pull together the necessary information to produce a secure Kubernetes manifest.
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
This architecture describes how to deploy a microservices application on Azure Kubernetes Service (AKS). AKS is a managed Kubernetes service that makes it easy to deploy, manage, and scale containerized applications.
The architecture consists of the following components:
The following steps describe the process for deploying a microservices application to AKS using this architecture:
Please open Telegram to view this post
VIEW IN TELEGRAM
In this article, we will explain how to create and manage the public and private subnets using terraform and create instance in the desired subnet.
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2
photo_2024-10-16_22-00-42.jpg
30.9 KB
After a long day of troubleshooting. I realized the error was in the Replicaset and Deployment. Lets talk about that.
ReplicaSet and Deployment are both Kubernetes resources used for managing and scaling application instances, but they serve different purposes and have distinct features:
It is a lower-level controller in Kubernetes.
It does not support declarative updates or rollback strategies.
It is often used directly only in advanced scenarios where finer control over scaling and updates is required.
It is a higher-level abstraction built on top of ReplicaSets.
Please open Telegram to view this post
VIEW IN TELEGRAM
❤1
Are you ready to level up your DevOps skills with GitHub Actions? Whether you're a beginner or an experienced engineer, this comprehensive guide has everything you need to know about automating CI/CD pipelines, integrating with popular DevOps tools, and optimizing workflows.
👨💻 This guide is packed with practical tips and examples to help you master GitHub Actions!
Please open Telegram to view this post
VIEW IN TELEGRAM
DEV Community
Mastering GitHub Actions for DevOps Engineers: A Complete Guide from Beginner to Advanced
GitHub Actions has revolutionized how developers and DevOps engineers automate workflows, enabling...
👍1
This media is not supported in your browser
VIEW IN TELEGRAM
Netflix's database infrastructure is a true marvel! They use a combination of several cutting-edge technologies to ensure content is available 24/7, without buffering or interruptions.
Netflix's engineering team leverages a diverse array of databases to deliver top-notch service. Here's a glimpse into their database selection:
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2
ReplicaSet and Deployment are both Kubernetes resources used for managing and scaling application instances, but they serve different purposes and have distinct features:
It is a lower-level controller in Kubernetes.
It does not support declarative updates or rollback strategies.
It is often used directly only in advanced scenarios where finer control over scaling and updates is required.
It is a higher-level abstraction built on top of ReplicaSets.
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2
Here are some commonly used Splunk commands:
1.
search: The primary command for searching data in Splunk. Use it to retrieve events based on specific criteria.2.
index: Specifies the index from which to retrieve data. You can filter data by index using this command.3.
source: Filters events based on the source of the data (e.g., log files, network streams).4.
sourcetype: Filters events based on the type of data source (e.g., Apache logs, Windows Event Logs).5.
eval: Creates calculated fields or modifies existing fields. Useful for creating custom fields or transforming data.6.
stats: Aggregates and summarizes data. You can use it to calculate counts, averages, and other statistics.7.
timechart: Generates time-based charts and visualizations. Useful for trend analysis and identifying patterns over time.8.
rex: Extracts fields using regular expressions. Helpful when dealing with unstructured data.9.
dedup: Removes duplicate events based on specified fields.10.
transaction: Groups related events into transactions. Useful for analyzing multi-step processes.11.
top: Identifies the top values for a specific field (e.g., top IP addresses, top error codes).12.
lookup: Enriches events by joining them with external lookup tables (e.g., mapping IP addresses to geolocation data).Remember that these commands are just a starting point. Depending on your use case, you might need to explore additional commands and features. Happy Splunking!🚀 🔍
For more detailed information, check out the Splunk Cheat Sheet and the Splunk Quick Reference Guide[1][2].
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2