?? Day 1: Clean up Kubernetes manifests using kubectl-neat
kubectl-neat?is a useful command-line tool to remove unnecessary clutter and metadata from your Kubernetes manifests, making them more readable and maintainable. It works seamlessly with?kubectl?to fetch and clean up manifests in one command.
To install?kubectl-neat, run:
curl -sLO https://github.com/itaysk/kubectl-neat/releases/download/vx.y.z/kubectl-neat_x.y.z_linux.tar.gz
tar -xzf kubectl-neat_x.y.z_linux.tar.gz
sudo mv kubectl-neat /usr/local/bin/
Replace?x.y.z?with the desired version of?kubectl-neat. Use the?kubectl-neat?command to clean up manifests:
kubectl get RESOURCE_NAME/RESOURCE_IDENTIFIER -o yaml | kubectl neat
For example,?kubectl get deployment/my-deployment -o yaml | kubectl neat.
By incorporating?kubectl-neat?into your workflow, you can keep your Kubernetes manifests tidy and easier to understand.
Stay tuned for more DevOps Tips & Tricks!