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-awsto/usr/local/binand setchmod u+x /usr/local/bin/cached-aws - Update
~/.kube/configto use the cached command (switchcommand: awstocommand: cached-aws
Verify with kubectl get pods or similar. After the first call you should notice API calls are much quicker.