A tool to compare Kubernetes resources between different namespaces, making it easy to spot differences across environments.
- π Compare Kubernetes resources between any two namespaces
- π¨ Colored diff output for better readability
- π§Ή Optional
kubectl neat
integration to clean output - π Multiple output formats (unified, context, side-by-side)
- π§ Support for all Kubernetes resource types
- π Verbose logging for debugging
curl -sSL https://raw.githubusercontent.com/rajamohan-rj/kdiff/main/install.sh | bash
iwr -useb https://raw.githubusercontent.com/rajamohan-rj/kdiff/main/install.ps1 | iex
go install github.com/rajamohan-rj/kdiff@latest
# Add the tap (after setting up Homebrew tap)
brew tap rajamohan-rj/tap
brew install kdiff
# Unix/Linux/macOS
curl -sSL https://raw.githubusercontent.com/rajamohan-rj/kdiff/main/install.sh | bash -s -- --dir ~/.local/bin
# Windows
iwr -useb https://raw.githubusercontent.com/rajamohan-rj/kdiff/main/install.ps1 | iex -InstallDir 'C:\tools'
# Unix/Linux/macOS
curl -sSL https://raw.githubusercontent.com/rajamohan-rj/kdiff/main/install.sh | bash -s -- --version v0.1.0
# Windows
iwr -useb https://raw.githubusercontent.com/rajamohan-rj/kdiff/main/install.ps1 | iex -Version 'v0.1.0'
Download the latest binary from releases and extract.
# Compare deployments between staging and production
kdiff staging my-app production my-app
# Compare services with verbose output
kdiff --verbose dev my-service prod my-service
# Compare without colored output
kdiff --no-color namespace1 deployment/app namespace2 deployment/app
# Use context diff format
kdiff --output context ns1 svc/api ns2 svc/api
# Compare with side-by-side format and skip kubectl neat
kdiff --output side-by-side --no-neat ns1 pod/web ns2 pod/web
--no-color
- Disable colored output--no-neat
- Skip kubectl neat processing--output
- Output format (unified, context, side-by-side)--verbose
- Enable verbose logging--version
- Show version information
kubectl
command-line toolkubectl neat
plugin (optional, for cleaner YAML output)colordiff
(optional, for colored output)
- Retrieves the specified resource from the first namespace using
kubectl get
- Retrieves the specified resource from the second namespace
- Optionally processes the YAML through
kubectl neat
to remove cluster-specific metadata - Performs a diff between the two YAML files
- Optionally colorizes the output using
colordiff
MIT License - see LICENSE file for details.