Containers, Kubernetes, OpenShift on Power

Containers, Kubernetes, OpenShift on Power

Connect, learn, share, and engage with IBM Power.

 View Only

Kubernetes Krew Plugin Support for Power

By PAUL BASTIDE posted Wed July 19, 2023 01:51 PM

  

Hey everyone,

Krew, the kubectl plugin package manager, is now available on Power. The release v0.4.4 has a ppc64le download. You can download and start taking advantage of the krew plugin list. ppc64le download. It also works with the OpenShift CLI.

The Krew website has a list of plugins - https://krew.sigs.k8s.io/plugins/. Not all of the plugins support ppc64le, however may are cross-arch scripts and are cross compiled such as view-utilization.

To take advantage of Krew with OpenShift, here are a few steps

  1. Download the krew-linux plugin

# curl -L -O https://github.com/kubernetes-sigs/krew/releases/download/v0.4.4/krew-linux_ppc64le.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 3977k 100 3977k 0 0 6333k 0 --:--:-- --:--:-- --:--:-- 30.5M
  1. Extract the krew plugin

tar xvf krew-linux_ppc64le.tar.gz ./LICENSE ./krew-linux_ppc64le
  1. Move to the /usr/bin so it's picked up by oc.

mv krew-linux_ppc64le /usr/bin/kubectl-krew
  1. Update the krew plugin

# kubectl krew update WARNING: To be able to run kubectl plugins, you need to add the following to your ~/.bash_profile or ~/.bashrc: export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" and restart your shell. Adding "default" plugin index from https://github.com/kubernetes-sigs/krew-index.git. Updated the local copy of plugin index.
  1. Update your shell:

# echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"' >> ~/.bashrc
  1. Restart your session (exit and come back to the shell so the variables are loaded)

  2. Try oc krew list


# oc krew list PLUGIN VERSION
  1. List all the plugins that support ppc64le.

# oc krew search | grep -v 'unavailable on linux/ppc64le' NAME DESCRIPTION INSTALLED allctx Run commands on contexts in your kubeconfig no assert Assert Kubernetes resources no bulk-action Do bulk actions on Kubernetes resources. no ... tmux-exec An exec multiplexer using Tmux no view-utilization Shows cluster cpu and memory utilization no
  1. Install a plugin

# oc krew install view-utilization Updated the local copy of plugin index. Installing plugin: view-utilization Installed plugin: view-utilization \ | Use this plugin: | kubectl view-utilization | Documentation: | https://github.com/etopeter/kubectl-view-utilization | Caveats: | \ | | This plugin needs the following programs: | | * bash | | * awk (gawk,mawk,awk) | / / WARNING: You installed plugin "view-utilization" from the krew-index plugin repository. These plugins are not audited for security by the Krew maintainers. Run them at your own risk.
  1. Use the plugin.

# oc view-utilization Resource Requests %Requests Limits %Limits Allocatable Schedulable Free CPU 7521 16 2400 5 45000 37479 37479 Memory 33477885952 36 3774873600 4 92931489792 59453603840 59453603840

Tip: There are many more plugins with ppc64le support and do not have the krew manifest updated.

Thanks to PR 755 we have support for ppc64le.

References

https://github.com/kubernetes-sigs/krew/blob/v0.4.4/README.md

https://github.com/kubernetes-sigs/krew/releases/download/v0.4.4/krew-linux_ppc64le.tar.gz


#power-featured-area-2
#power-featured-area-2
#power-featured-area-1
0 comments
640 views

Permalink