nixos-config/modules/cli/kubernetes.nix
Sean Buckley e014507cd4 install gke-gcloud-auth-plugin
(kubernetes / kubectl / google gcp)
2024-06-12 20:58:59 -04:00

18 lines
456 B
Nix

{ pkgs, ... }:
{
programs.bash.interactiveShellInit = ''
source <(kubectl completion bash)
complete -F __start_kubectl k
'';
environment.systemPackages = with pkgs; [
kubectl
kubernetes-helm
stern
(google-cloud-sdk.withExtraComponents
[ google-cloud-sdk.components.gke-gcloud-auth-plugin ])
# dedicated script, because bash aliases dont work with `watch`
(writeShellScriptBin "k" "exec kubectl \"$@\"")
];
}