Package: kube-tools-kferrone
Kube ToolsA useful set of kustomize and kubectl tools for improving the kubectl experience.RequirementsThe following CLI applications must be installed for everything to work. Most of these can be installed with your package manager of choice, iebrew,choco, etc.kubectlkustomizehelmkrewyqpython3- Alternatively withBrewaws-clilastpass-cli- Optional, used for kustomize lastpass secret generator. Doesn't work with sso unfortunately.Configure AWS CLIIt is bad practice to rely on AWS Access Keys, therefore use SSO to login to CLI for super secure and wory free access to AWS.Initialize Profile:Each time you need access to another account, run this once to set up the profile. You will need the start URL from your admin for the first step in the process.awsconfiguressoLogging InOnce your profile is setup you will be logged at that moment. However the SSO will eventually time out and you will simply login again with:awsssologinConfigurekubectlNow we want to set up our environment for kubectl, kustomize, and helm. These three are the main local cli tools for working with kubernetes. To use this project as the working directory simply by exportingXDG_CONFIG_HOMEand adding the kubectl plugins to yourPATH.~/.bash_profileexportXDG_CONFIG_HOME="$HOME/git/kube-tools"exportPATH=$PATH:$XDG_CONFIG_HOME/kubectl/pluginaliask="kubectl"Here is what's going on:kustomizeis looking for$XDG_CONFIG_HOME/kustomize/pluginkubectlis looking for executables on thePATHwhich start withkubectl-, e.g.kubectl-myplugin. This is why we add the/kubectl/plugindir to the path.helmis looking to create a working dir at$XDG_CONFIG_HOME/helm.The alias saves time as you only need to typekinstead ofkubectlXDG_CONFIG_HOMEis the path to this directoryInstall Python PackageA few plugins are using python. The end result is a number of kubectl plugins created using the magik of python endpoints.From this directory simply runpip3install.Useful Kubectl Plugins with KrewKrew is the plugin manager for kubectl.It works just like any other package manager:kkrewinstall<plugin-name>These two are most recommended:kkrewinstallctx,nsGain Access to EKS ClusterAssuming you have a valid aws-cli profile initialized, aws-cli will configurekubectlwith credentials to EKS. Simply run the command below replacing or setting the variables denoted with$. This command will auto update or create the$KUBECONFIGautomagically for you.awseksupdate-kubeconfig\--name$CLUSTER_NAME\--region$REGION\--role-arn$ROLE_ARN\--profile$PROFILE_NAMEViewing and Managing ResourcesWhen it comes to accessing resources, ie viewing and managing, in a Kubernetes cluster there are many options. No matter what tool, ie GUI, you use, they all use the same$KUBECONFIG. This means from here on you can freely install any Kubernetes tools you like and they all simply just work and have the same access to the same clusters.The following is a curated list of tools which have a proven track record and loved by many.1.kubectlandkuifor controlOption 1 is simply using kubectl and all the plugins from this project. It's really all you need and it is the official CLI for kubernetes. If you really want to turbochargekubectl, the official kubernetes team has created an innovative GUI/CLI hybrid namedkui. It is a wrapper for kubectl in an electron window which beautifies the output with HTML/CSS/JS.2.Lensfor focusOption 2 is the highest recommended for ease of use and high performance. It is by far the simplest to navigate and sports a ton of awesome features to make working with kubernetes an absolute dream.Get started here!3.VSCodefor developmentOption 3 is simply to use everyones favorite "text editor".The official VSCode Kubernetes plugin by Microsoftintegrates the most useful aspects of kubernetes for developers such as terminal access, logs, and a simple explorer to view the raw yaml of kubernetes resources.4. Etc... for curiousityOption 4 is to pick something else from the many options out there. Here is a quick curated list of some other notable GUI options.Octant by VMWare- Browser Application, cluster or localk9s-cli- Advanced Terminal GUIKubenav- Standalone Application with mobile supportkubelive- Advanced Terminal GUIKubevious- Browser Application, cluster only