https://harshhaa.hashnode.dev/deployment-of-super-mario-on-kubernetes-using-terraform
Follow🍩 Like 👍 Share 👍 Comment Your thoughts 💬
🌟 𝗙𝗼𝗹𝗹𝗼𝘄 @prodevopsguy 𝗳𝗼𝗿 𝗺𝗼𝗿𝗲 𝘀𝘂𝗰𝗵 𝗰𝗼𝗻𝘁𝗲𝗻𝘁 𝗮𝗿𝗼𝘂𝗻𝗱 𝗰𝗹𝗼𝘂𝗱 & 𝗗𝗲𝘃𝗢𝗽𝘀!!!
Follow
Please open Telegram to view this post
VIEW IN TELEGRAM
ProDevOpsGuy Team
The Ultimate DevOps Bootcamp 2024 Pack by ProDevOpsGuy | Pro DevOpsGuy
https://prodevopsguy.github.io/2024/Ultimate-DevOps-Bootcamp-2024-Pack/
⚠️ Note: Anyone Interested, can open the Blog 🌐 , share it to your friends and colleagues.
🔵 𝗙𝗼𝗹𝗹𝗼𝘄 @prodevopsguy 𝗳𝗼𝗿 𝗺𝗼𝗿𝗲 𝘀𝘂𝗰𝗵 𝗰𝗼𝗻𝘁𝗲𝗻𝘁 𝗮𝗿𝗼𝘂𝗻𝗱 𝗰𝗹𝗼𝘂𝗱 & 𝗗𝗲𝘃𝗢𝗽𝘀!!!
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
1️⃣ . ImageBackPullOff
We face this issue when the image is not present in registry or the given image tag is wrong.
Make sure you provide correct registry url, image name and image tag.
We might face authentication failures, when image is being stored in a private registry, make sure to create secret with private registry credentials and add created secret in Kubernetes Deployment File to pull docker image.
2️⃣ . CrashLoopBackOff
We face this issue when the process deployed inside container not running then the POD will be moved to CrashLoopBackOff.
POD might be running out of CPU or memory, POD should get enough resources allocated that’s cpu and memory for an application to be up and running, to fix that check in Resources Requests and Resources Limits.
3️⃣ . OOM Killed - Out Of Memory
We face this issue when PODs tries to utilise more memory than the limits we have set.
We can resolve it by setting appropriate resource request and resource limit.
4️⃣ . POD Status - Pending
When nodes might not be ready and required resources like CPU and Memory may not be available in nodes for the PODs to be up and running.
5️⃣ . POD Status - Waiting
POD will be scheduled to a node but POD won’t be running in scheduled node.
We can fix this by providing correct image name, image tag and authentication to registry.
6️⃣ . POD will be up and running and application is not accessible.
We can fix this by creating appropriate service.
If service is already created and application is still not accessible, make sure application and service are deployed in same namespace.
7️⃣ . POD Status - Evicted
We can resolve this by setting appropriate resource requests and resource limits for the PODs and having enough resources in worker nodes.
Please open Telegram to view this post
VIEW IN TELEGRAM
Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability. Below is a an overview of the Prometheus architecture:
- Core for collecting, storing, and querying time-series data.
- It’s pull-based and scrapes metrics from targets at regular intervals.
- Stores data in a local time-series database.
- Apps or services expose metrics.
- Prometheus scrapes metrics from these targets.
- Time-series data with metric names and labels.
- Example: `http_requests_total{method="GET", status="200"}`.
- Query language for time-series data.
- Allows filtering, grouping, and math operations on metrics.
- Handles alerts from Prometheus.
- Manages notifications and integrates with third-party channels.
- Uses local on-disk storage.
- Data retention policies.
- Data is organized in blocks and compacted over time.
- Targets and scrape intervals defined in Prometheus config files.
- Relabeling allows modifying or filtering metrics before storage.
- Prometheus Server scrapes metrics from configured targets.
- Targets expose metrics typically at /metrics endpoint.
- Scraped metrics stored in the local time-series database.
- Data organized by metric name and labels.
- Users utilize PromQL to query and analyze stored metrics.
- Grafana or Prometheus's UI visualizes query results.
- Prometheus evaluates alerting rules based on queries.
- Alerts sent to Alertmanager if conditions are met.
- Alertmanager receives alerts and manages their lifecycle.
- Handles deduplication, grouping, and sends notifications to configured channels.
- Simple configuration for monitoring targets.
- Powerful query language (PromQL).
- Effective alerting and notification handling.
- Seamless integration with visualization tools.
Please open Telegram to view this post
VIEW IN TELEGRAM
1699280774061.pdf
236.7 KB
Please open Telegram to view this post
VIEW IN TELEGRAM
1705900428288.gif
1 MB
Version control with 🧑💻 GIT has become an essential skill for developers.
In this post, I'll provide a quick overview of some core GIT concepts and commands.
Key concepts:
➡️ Repository - Where your project files and commit history are stored
➡️ Commit - A snapshot of changes, like a version checkpoint
➡️ Branch - A timeline of commits that lets you work on parallel versions
➡️ Merge - To combine changes from separate branches
➡️ Pull request - Propose & review changes before merging branches
Key commands:
➡️ git init - Initialize a new repo
➡️ git status - View changed files not staged for commit
➡️ git add - Stage files for commit
➡️ git commit - Commit staged snapshot
➡️ git branch - List, create, or delete branches
➡️ git checkout - Switch between branches
➡️ git merge - Join two development histories (branches)
➡️ git push/pull - Send/receive commits to remote repo
✈️ 𝗙𝗼𝗹𝗹𝗼𝘄 @prodevopsguy 𝗳𝗼𝗿 𝗺𝗼𝗿𝗲 𝘀𝘂𝗰𝗵 𝗰𝗼𝗻𝘁𝗲𝗻𝘁 𝗮𝗿𝗼𝘂𝗻𝗱 𝗰𝗹𝗼𝘂𝗱 & 𝗗𝗲𝘃𝗢𝗽𝘀!!!
In this post, I'll provide a quick overview of some core GIT concepts and commands.
Key concepts:
Key commands:
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
kubectl create -f pod.yamlkubectl get podskubectl describe pod <pod_name>kubectl logs <pod_name>kubectl exec -it <pod_name> -- <command>kubectl delete pod <pod_name>kubectl create -f deployment.yamlkubectl get deploymentskubectl describe deployment <deployment_name>kubectl scale --replicas=3 deployment/<deployment_name>kubectl rollout status deployment/<deployment_name>kubectl rollout history deployment/<deployment_name>kubectl create -f service.yamlkubectl get serviceskubectl describe service <service_name>kubectl delete service <service_name>kubectl create configmap <configmap_name> --from-file=<file_path>kubectl get configmapskubectl describe configmap <configmap_name>kubectl delete configmap <configmap_name>kubectl create secret generic <secret_name> --from-literal=<key>=<value>kubectl get secretskubectl describe secret <secret_name>kubectl delete secret <secret_name>kubectl get nodeskubectl describe node <node_name>kubectl get namespaceskubectl describe namespace <namespace_name>kubectl get pv / kubectl get pvckubectl describe pv <pv_name> / kubectl describe pvc <pvc_name>kubectl delete pv <pv_name> / kubectl delete pvc <pvc_name>Please open Telegram to view this post
VIEW IN TELEGRAM
Docker has revolutionized the world of containerization, enabling scalable and efficient application deployment.
To make the most of this powerful tool, here are 10 essential Docker best practices:
Please open Telegram to view this post
VIEW IN TELEGRAM
ansible-inventory: To view the current inventory.ansible-inventory --graph: To visualize inventory as a graph.ansible-inventory --list: To list all hosts in the inventory.ansible: Run a single command on one or more managed nodes. Example:
ansible all -m ping (ping all hosts).ansible <group_name> -m <module_name> -a "<module_arguments>": Execute a module on a specific group of hosts. Example: ansible web_servers -m shell -a "uptime"ansible-playbook: Run a playbook. Example: ansible-playbook deploy.yml.ansible-playbook --syntax-check: Check syntax of playbook.ansible-playbook --list-tasks: List tasks in a playbook without executing them.ansible-galaxy init <role_name>: Initialize a new role.ansible-galaxy install <role_name>: Install a role from Ansible Galaxy.ansible-galaxy remove <role_name>: Remove a role.ansible-galaxy list: List installed roles.ansible-vault create <filename>: Create a new encrypted file.ansible-vault edit <filename>: Edit an encrypted file.ansible-vault encrypt <filename>: Encrypt an existing file.ansible-vault decrypt <filename>: Decrypt an encrypted file.ansible-inventory --refresh: Refresh dynamic inventory.ansible-inventory --graph: Visualize dynamic inventory as a graph.🐠 Tags:
Use tags in playbooks to execute specific tasks. Example:
ansible-playbook deploy.yml --tags "nginx,php"Please open Telegram to view this post
VIEW IN TELEGRAM
Ever struggled with deploying multi-container applications? Enter 𝗱𝗼𝗰𝗸𝗲𝗿-𝗰𝗼𝗺𝗽𝗼𝘀𝗲 𝘂𝗽!
One command to rule them all - orchestrating your containers seamlessly.
Spin up your dev environment with ease, define services, and voila! But wait, there's more - when it's time to call it a day, simply do a graceful exit with 𝗱𝗼𝗰𝗸𝗲𝗿-𝗰𝗼𝗺𝗽𝗼𝘀𝗲 𝗱𝗼𝘄𝗻.
Clean, efficient, and a game-changer for simplifying your development workflow.
Please open Telegram to view this post
VIEW IN TELEGRAM
𝑱𝒐𝒊𝒏 𝑶𝒖𝒓 𝑻𝒆𝒄𝒉 𝑪𝒐𝒎𝒎𝒖𝒏𝒊𝒕𝒚 -> 𝑮𝒖𝒊𝒅𝒆 𝑶𝒕𝒉𝒆𝒓’𝒔
- Control your code with Git. It keeps track of changes and helps you work together on projects.
- Get comfy with Linux basics. It's like the home for your code, and knowing your way around is a big plus.
- Learn to talk to computers! Python and GO are like your special languages for making things happen in the digital world.
- Understand databases - they're where you store and fetch data. Knowing how they work is super important.
- Imagine the internet as a giant highway. Networking helps you build and navigate the roads for your digital traffic.
- Meet Jenkins, your automation buddy. It helps you put code together, test it, and deliver it smoothly.
- Workflows made easy! GitHub Actions automates tasks like testing and deploying, right from your GitHub space.
- GitLab CI is another cool friend. It makes sure your code is always in tip-top shape with continuous integration and delivery.
- Think of Circle CI as your helper in the cloud. It makes sure your code gets where it needs to go without a hitch.
- Docker is like a magic box. It helps you pack your software in a way that it runs the same everywhere.
- Imagine having a tiny helper organizing all your software containers. That's Kubernetes – making sure everything runs smoothly.
- HELM is like your toolkit for managing and releasing your software on Kubernetes. It makes your job way easier.
- These are like three big playgrounds for your digital creations. Pick one (or all) and learn how to play!
- Terraform is your digital construction worker. It builds and manages your online world without breaking a sweat.
- Meet Ansible, your automation genie. It makes sure everything in your digital kingdom is in order.
- Grafana is like your digital eyes. It helps you see and understand what's happening in your digital world with cool dashboards.
- Elastic Stack is your superhero trio – Elasticsearch, Logstash, and Kibana. They work together to manage and analyze your digital logs.
- Prometheus is your guard dog. It keeps watch and warns you if anything is going wrong in your digital space.
Please open Telegram to view this post
VIEW IN TELEGRAM
Follow
Please open Telegram to view this post
VIEW IN TELEGRAM
1706007878578.gif
862.6 KB
You will learn about the following from the Blog.- High Level Prometheus Architecture
Please open Telegram to view this post
VIEW IN TELEGRAM
You should know these 15 plugins
𝟭. 𝗦𝘁𝗲𝗿𝗻: Enhances log monitoring with regex support for Pod and Container IDs, similar to 'tail -f'.
𝟮. 𝗥𝗕𝗔𝗖-𝘁𝗼𝗼𝗹: Simplifies querying and creating RBAC policies, with visualization features.
𝟯. 𝗸𝘂𝗯𝗲𝗰𝘁𝗹-𝗰𝗶𝗹𝗶𝘂𝗺: Manages Cilium network security, providing eBPF dataplane capabilities.
𝟰. 𝗞𝘂𝗯𝗲 𝗣𝗼𝗹𝗶𝗰𝘆 𝗔𝗱𝘃𝗶𝘀𝗼𝗿: Advises on PodSecurityPolicies and OPA Policies, enhancing admission control.
𝟱. 𝗞𝘂𝗯𝗲𝗰𝘁𝗹-𝘀𝘀𝗺-𝘀𝗲𝗰𝗿𝗲𝘁: Facilitates the import/export of Kubernetes Secrets to/from AWS SSM Parameter Store.
𝟲. 𝗞𝘂𝗯𝗲𝗹𝗼𝗴𝗶𝗻: Streamlines logging into Kubernetes clusters via CLI with OpenID Connect providers.
𝟳. 𝗞𝘂𝗯𝗲𝗰𝘁𝗹-𝘄𝗵𝗶𝘀𝗽𝗲𝗿-𝘀𝗲𝗰𝗿𝗲𝘁: Improves secret creation with secure input prompts, protecting against leaks.
𝟴. 𝗞𝘂𝗯𝗲𝗰𝘁𝗹-𝗰𝗮𝗽𝘁𝘂𝗿𝗲: Enables packet capture for container troubleshooting and security investigations.
𝟵. 𝗞𝘂𝗯𝗲𝗰𝘁𝗹-𝘁𝗿𝗮𝗰𝗲: Facilitates distributed tracing in Kubernetes, aiding in security and performance analysis.
𝟭𝟬. 𝗔𝗰𝗰𝗲𝘀𝘀-𝗺𝗮𝘁𝗿𝗶𝘅 (𝗥𝗮𝗸𝗸𝗲𝘀𝘀): Displays an access matrix for server resources, highlighting CRUD permissions.
𝟭𝟭. 𝗥𝗼𝗹𝗲𝘀𝘂𝗺: Generates a summary of roles and permissions in the cluster, aiding in access control reviews.
𝟭𝟮. 𝗖𝗲𝗿𝘁-𝗠𝗮𝗻𝗮𝗴𝗲𝗿: Automates TLS certificate management, ensuring secure and up-to-date communication.
𝟭𝟯. 𝗻𝗽-𝘃𝗶𝗲𝘄𝗲𝗿: Visualizes network policies and topologies, helping to identify misconfigurations.
𝟭𝟰. 𝗸𝘀𝗻𝗶𝗳𝗳: Captures and analyzes network traffic for security assessments and troubleshooting.
𝟭𝟱. 𝗜𝗻𝘀𝗽𝗲𝗸𝘁𝗼𝗿-𝗚𝗮𝗱𝗴𝗲𝘁: The eBPF tool and systems inspection framework for Kubernetes, containers and Linux hosts.
Please open Telegram to view this post
VIEW IN TELEGRAM
If you take out the tools, there are generic role specific requirements that companies will expect from you once you are onboard.
Keeping it simple, there are 4 levels for a DevOps role in IT.
- Collaborate with developers and IT staff to manage code releases.
- Assist in automating processes to improve efficiency.
- Implement and maintain CI/CD pipelines.
- Monitor system performance and troubleshoot issues.
- Assist in the design and implementation of infrastructure as code (IaC).
- Manage and improve CI/CD pipelines.
- Automate operational processes.
- Implement and manage monitoring and logging solutions.
- Collaborate with development and operations teams to ensure smooth deployment and operation of systems.
- Troubleshoot and resolve issues in development, test, and production environments.
- Implement and manage containerization and orchestration technologies (e.g., Docker, Kubernetes).
- Lead and mentor junior members of the DevOps team.
- Architect and design highly available and scalable systems.
- Evaluate new technologies and tools to improve the DevOps process.
- Develop and implement best practices for infrastructure automation and configuration management.
- Collaborate with other teams to improve overall system reliability and performance.
- Define the overall DevOps strategy for the organization.
- Lead large-scale infrastructure and automation projects.
- Drive innovation and continuous improvement within the DevOps team.
- Act as a subject matter expert for DevOps practices and technologies.
- Collaborate with executive leadership to align DevOps initiatives with business goals.
Please open Telegram to view this post
VIEW IN TELEGRAM
Deployments types are decided based on various factors. including client unique requirements , flexibility , scalability , managing risk and much more !
Please open Telegram to view this post
VIEW IN TELEGRAM