From 07ff3327299e8a1ec2ba91a4b94d359e879152a3 Mon Sep 17 00:00:00 2001 From: Marc Campbell Date: Tue, 6 Aug 2019 01:04:56 +0000 Subject: [PATCH] Add usage doc --- doc/USAGE.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc/USAGE.md diff --git a/doc/USAGE.md b/doc/USAGE.md new file mode 100644 index 0000000..6b43423 --- /dev/null +++ b/doc/USAGE.md @@ -0,0 +1,28 @@ +kubectl-outdated finds and reports on any outdated images running in a Kubernetes cluster. + +## Usage +The following assumes you have kubectl-outdated installed via + +```shell +kubectl krew install outdated +``` + +### Scan images in your current kubecontext + +```shell +kubectl outdated +``` + +### Scan images in another kubecontext + +```shell +kubectl outdated --kubecconfig=/path/to/kubeconfig +``` + +## How it works +The plugin will iterate through readable namespaces, and look for pods. For every pod it can read, the plugin will read the podspec for the container images, and any init container images. Additionally, it collects the content sha of the image, so that it can be used to disambiguate between different versions pushed with the same tag. + +After collecting a list of images running and deduplicating this list, the plugin will anonymously connect to all required image repositories and request a list of tags. For tags and images that follow strict semver naming, the list is simply sorted and the plugin reports how out of date the running image is. + +For images that aren't semver named, the plugin starts to collect tags dates from the manifest and sorts to find any tag that was pushed after the tag that is running. +