Introduction
Checking for any Kubernetes API deprecations manually can be annoying, and that is not a good approach. As professionals, we have to automate the repeating tasks.
Here, keeping up with Kubernetes deprecations can be challenging. That’s where Pluto comes in, a powerful open-source tool that helps identify deprecated Kubernetes APIs in your manifests and Helm charts.
Recently, I integrated Pluto into my GitHub Actions CI/CD workflow, ensuring that deprecated Kubernetes API never caused any issues to our CI/CD workflow. In this blog, We'll get to know about :
Why is Pluto essential for AWS EKS users?
Challenges AWS EKS users face with Kubernetes API Deprecations
How did I integrate Pluto into my GitHub Actions workflow?
Key challenges I faced and how I overcame them
Why is Pluto essential for AWS EKS users?
AWS EKS needs to know the reason behind integrating Pluto into our workflow. AWS EKS follows the Kubernetes release cycle. Kubernetes releases newer APIs over a period (approximately every four months), and simultaneously, older versions are Deprecated.
When an EKS cluster is upgraded to a newer Kubernetes version, any workflows carrying on outdated APIs may break if those APIs have been removed. This can lead to service disruptions, failed deployments, and broken automation workflows.
Challenges AWS EKS Users Face with Kubernetes API Deprecations
Frequent Kubernetes Upgrades in EKS
AWS EKS supports only three stable Kubernetes versions at a time.
Older versions are removed every 12-14 months, forcing users to upgrade regularly.
If you skip upgrades, your workloads might suddenly stop working when AWS removes support for an older version.
Manually Tracking API Deprecations Is Difficult
Kubernetes changelogs list deprecated APIs, but manually checking each manifest or Helm chart across multiple clusters will be annoying and not a good practice.
Developers need a reliable tool to automate this process and alert them to potential issues before an upgrade happens.
What Pluto Does:
Scans Kubernetes manifests, Helm charts, and live clusters for deprecated or removed API versions.
Checking Live EKS Clusters for Deprecated APIs
Lists deprecated APIs and suggests updated versions.
Helps identify issues before a Kubernetes upgrade.
Reducing Downtime and Deployment Failures
How I integrated Pluto into my GitHub Actions workflow
Integrating Pluto into our CI/CD workflow is simple, and that can be done with the following steps :
Step 1: Copy and paste the below code into your GitHub actions workflow file for integrating Pluto.
- name: Download Pluto
uses: FairwindsOps/pluto/github-action@master
- name: Scanning for deprecated kubernetes API
run: |
pluto detect-files -d #add path of the directory you want to scan (..eg: ./k8s-manifests/)
Step 2: How this works
Download Pluto - Uses Pluto’s GitHub Action instead of manual installation.
Scan for Deprecated APIs - Runs Pluto on the specified directory (./k8s-manifests/).
Challenges & Solutions in Pluto Integration:
Challenge 1: Pluto Scanning the Entire Repo :
Solution: Be very specific in adding the directory path, It Scans for the entire directory for files, so specify the correct directory to avoid unnecessary scanning.
Challenge 2: Keeping Track of API Changes Over Time
Solution: Regularly monitor Kubernetes release notes and configure Pluto to check for deprecated APIs on each pull request, ensuring early detection of any breaking changes.
Challenge 3: Inconsistent API Versioning Across Multiple Manifests
Solution: Implement automated tests that verify the compatibility of Kubernetes API versions across all manifests before deployment, helping ensure consistent versioning.
Best Practices for Pluto in CI/CD
Run Pluto on Pull Requests to catch deprecated APIs early.
Use the correct directory path to optimize scanning.
Fail the pipeline on deprecated APIs to enforce best practices.
Regularly update Pluto to detect new deprecations.
Conclusion:
Kubernetes API deprecations can significantly disrupt AWS EKS workflows, especially when handling frequent upgrades and outdated API versions. By integrating Pluto into your CI/CD pipeline, you ensure that deprecated APIs are automatically detected, reducing the risk of failed deployments and service disruptions. Here's a summary of why Pluto is essential and how to make the most of it:
Automation of API Deprecation Checks
Easier Management of Kubernetes Upgrades
Efficient Integration with GitHub Actions
Prevention of Service Disruptions
Adding Pluto to your CI/CD pipeline is a smart way to keep your workflows smooth and future-ready. It saves you time and helps prevent issues, making your Kubernetes deployments more reliable and stress-free.
EzyInfra.dev is a DevOps and Infrastructure consulting company helping clients in Setting up the Cloud Infrastructure (AWS, GCP), Cloud cost optimization, and manage Kubernetes-based infrastructure. If you have any requirements or want a free consultation for your Infrastructure or architecture, feel free to schedule a call here.
Share this post