This will greatly speed up any kubectl commands that run. Otherwise each kubectl
call has to regenerate a STS token. This one caches the value for 800 seconds (tokens are valid for ~900 seconds).
To use:
- Add
cached-aws
to/usr/local/bin
and setchmod u+x /usr/local/bin/cached-aws
- Update
~/.kube/config
to use the cached command (switchcommand: aws
tocommand: cached-aws
Verify with kubectl get pods
or similar. After the first call you should notice API calls are much quicker.