Skip to main content

Kube Tools

A useful set of kustomize and kubectl tools for improving the kubectl experience.

Requirements

The following CLI applications must be installed for everything to work. Most of these can be installed with your package manager of choice, ie brew, choco, etc.

Configure AWS CLI

It 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.

aws configure sso

Logging In

Once 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:

aws sso login

Configure kubectl

Now 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 exporting XDG_CONFIG_HOME and adding the kubectl plugins to your PATH.

~/.bash_profile

export XDG_CONFIG_HOME="$HOME/git/kube-tools"
export PATH=$PATH:$XDG_CONFIG_HOME/kubectl/plugin
alias k="kubectl"

Here is what's going on:

  • kustomize is looking for $XDG_CONFIG_HOME/kustomize/plugin
  • kubectl is looking for executables on the PATH which start with kubectl-, e.g. kubectl-myplugin. This is why we add the /kubectl/plugin dir to the path.
  • helm is looking to create a working dir at $XDG_CONFIG_HOME/helm.
  • The alias saves time as you only need to type k instead of kubectl
  • XDG_CONFIG_HOME is the path to this directory

Install Python Package

A 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 run

pip3 install .

Useful Kubectl Plugins with Krew

Krew is the plugin manager for kubectl.
It works just like any other package manager:

k krew install <plugin-name>

These two are most recommended:

k krew install ctx, ns

Gain Access to EKS Cluster

Assuming you have a valid aws-cli profile initialized, aws-cli will configure kubectl with credentials to EKS. Simply run the command below replacing or setting the variables denoted with $. This command will auto update or create the $KUBECONFIG automagically for you.

aws eks update-kubeconfig \ 
    --name $CLUSTER_NAME \ 
    --region $REGION \
    --role-arn $ROLE_ARN \
    --profile $PROFILE_NAME

Viewing and Managing Resources

When 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. kubectl and kui for control

Option 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 turbocharge kubectl, the official kubernetes team has created an innovative GUI/CLI hybrid named kui. It is a wrapper for kubectl in an electron window which beautifies the output with HTML/CSS/JS.

2. Lens for focus

Option 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. VSCode for development

Option 3 is simply to use everyones favorite "text editor". The official VSCode Kubernetes plugin by Microsoft integrates 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 curiousity

Option 4 is to pick something else from the many options out there. Here is a quick curated list of some other notable GUI options.

Metadata

Release files for kube-tools-kferrone 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kube-tools-kferrone 1.0.2
File Size Uploaded Provenance Actions
kube-tools-kferrone-1.0.2.tar.gz 10.5 kB Without provenance Details for kube-tools-kferrone-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kube-tools-kferrone 1.0.2
File Interpreter ABI Platform Actions
kube_tools_kferrone-1.0.2-py3-none-any.whl Python 3 none any Details for kube_tools_kferrone-1.0.2-py3-none-any.whl

Total release size: 19.5 kB

Release files / kube-tools-kferrone-1.0.2.tar.gz

Download URL kube-tools-kferrone-1.0.2.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0c9ffafd573dad4e122477669b3e6ff8d915984b7847fbf2c95657bd38a54f52
BLAKE2b-256 checksum
How to use checksums
1e449816910e28a106fc0f4ca751ca04d872c3391627051045097294d2b7da43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

Release files / kube_tools_kferrone-1.0.2-py3-none-any.whl

Download URL kube_tools_kferrone-1.0.2-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84332643bbd276c73714366a8230c6a7c28ac57b3950ed01deb997eec7a23e46
BLAKE2b-256 checksum
How to use checksums
b993d11dc7685a9dcef9cffc8ee0934b84dc4d0d48461cd548c4790d5c49ccbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

Security for kube-tools-kferrone 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page