This repository has been archived by the owner on Mar 20, 2023. It is now read-only.
1.6 – Compatibility with kubectl plugins
Changes since last stable release (1.4):
- Improved placement of
context
andnamespace
options in the final bash command- Formerly, kubectl-repl used to insert those options directly after
kubectl
such askubectl --namespace=default plugin-name
. This was however incompatible with kubectl plugins (see https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/). - Now the options are placed after the command names, but before other options. Continuing with the previous example, now the final command would be
kubectl plugin-name --namespace=default
.
- Formerly, kubectl-repl used to insert those options directly after
- Fixes #10 Objects with hyphens seem to break
A practical example of a kubectl plugin is an executable named kubectl-old
somewhere in your $PATH
such as this:
#!/usr/bin/env bash
set -eu
kubectl get "$@" --sort-by=.metadata.creationTimestamp
That allows you to call kubectl old pods
(get pods sorted by creation time) in addition to the original kubectl get pods
(sorted by name). In kubectl-repl, this of course simplifies to invoking old pods
.
Note the the plugin cannot be called kubectl-get-sorted
for example, because the builtin commands cannot be overshadowed even when the longest executable filename rule would take place.
Complete changelog since the previous release: 1.4...1.6
This release is also available as a Docker image:
https://hub.docker.com/r/mikulas/kubectl-repl/