• Home
  • About
  • Contact
  • Privacy
  • Terms
  • DCMA
  • Write For Us / Submit
Tech News, Magazine & Review WordPress Theme 2017
  • Tech
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Gear
    • All
    • Camera
    • Laptop
    • Smartphone
    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    Exploring the Innovative Features of Pear Phones

    Exploring the Innovative Features of Pear Phones

    Latest Smart Home Gadgets for a Connected Life

    Latest Smart Home Gadgets for a Connected Life

    Eco-Friendly Products for Students

    Eco-Friendly Products for Students

    Essential Photography Equipment and Gadgets

    Mastering Your Shots: Essential Photography Equipment and Gadgets

    Level Up Your Game: Must-Have Gaming Gear!

    Level Up Your Game: Must-Have Gaming Gear!

    Trending Tags

    • Best iPhone 7 deals
    • Apple Watch 2
    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • iOS 10
    • iPhone 7
    • Sillicon Valley
  • Gaming
    Master the World of Online Gaming with the Best Gaming VPN

    Master the World of Online Gaming with 3 Best Gaming VPN

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    5 Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    9 Best Alternative Games Like Kahoot

    9 Best Alternative Games Like Kahoot

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

  • Crypto
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Business
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

No Result
View All Result
Geeky Insider
  • Tech
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Gear
    • All
    • Camera
    • Laptop
    • Smartphone
    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    Exploring the Innovative Features of Pear Phones

    Exploring the Innovative Features of Pear Phones

    Latest Smart Home Gadgets for a Connected Life

    Latest Smart Home Gadgets for a Connected Life

    Eco-Friendly Products for Students

    Eco-Friendly Products for Students

    Essential Photography Equipment and Gadgets

    Mastering Your Shots: Essential Photography Equipment and Gadgets

    Level Up Your Game: Must-Have Gaming Gear!

    Level Up Your Game: Must-Have Gaming Gear!

    Trending Tags

    • Best iPhone 7 deals
    • Apple Watch 2
    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • iOS 10
    • iPhone 7
    • Sillicon Valley
  • Gaming
    Master the World of Online Gaming with the Best Gaming VPN

    Master the World of Online Gaming with 3 Best Gaming VPN

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    5 Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    9 Best Alternative Games Like Kahoot

    9 Best Alternative Games Like Kahoot

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

  • Crypto
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Business
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

Submit
Geeky Insider
No Result
View All Result

How to Get Started With Krew, the Kubectl Plugin Manager

by Staff Writer
July 14, 2022
in How To
Reading Time: 6 mins read
Graphic showing the Kubernetes logo
Share on FacebookShare on Twitter

Krew is a package manager for Kubectl, the official Kubernetes CLI. Using Krew you can find, install, and update Kubectl plugins that extend the CLI with additional functionality.

Kubectl’s plugins mechanism supports several plugin installation methods. The simplest way is to pop plugins straight into a directory that’s in your PATH. This is a manual process which offers no way to update the plugin as new releases are published.

Table of Contents

Toggle
    • READ ALSO
    • How to Activate Iphone With Sim Card
    • How to Quickly Divide or Split PDF Files
  • Installing Krew
  • Updating the Plugin Index
  • Installing Plugins
  • Updating to New Plugin Releases
  • Searching for Plugins
  • Using Custom Indexes
  • Publishing Your Own Plugins
  • Conclusion

READ ALSO

transfer whatsapp from android to iphone

How to Transfer WhatsApp from Android to iPhone!

October 6, 2023
How to prevent phishing attacks

How to Prevent Phishing Attacks: Safeguarding Your Digital Identity

May 14, 2023

Krew provides common package management functionalities for the Kubectl plugin ecosystem. It maintains a public index of known packages and supports third-party indexes too. The latter lets you publish plugins privately within an organization or team.

Installing Krew

Krew is an open-source tool that’s part of the Kubernetes project. It doesn’t come bundled with Kubectl though. To get started with Krew, you must manually download and install the latest release. Current Krew distributions work with Kubectl v1.12 and later.

Downloads are available from the project’s GitHub releases page. The distribution tar archives contain the Krew binary. Run its installation script to finish adding Krew to your system:

$ ./krew-linux_amd64 install krew

A complete script that automatically downloads and installs the correct Krew distribution for your system is available within the documentation.

Next you should update your PATH to include Krew’s bin directory. This is located within $KREW_ROOT which is usually $HOME/.krew. Executables from Kubectl plugins you install will be stored inside the bin subdirectory.

$ export PATH=”${KREW_ROOT:-$HOME/.krew}/bin:$PATH”

Now you should be able to use Krew via the kubectl krew command:

~$ kubectl krew
krew is the kubectl plugin manager.
You can invoke krew through kubectl: “kubectl krew [command]…”

Usage:
kubectl krew [command]
…

Updating the Plugin Index

Krew’s plugin index catalogs all the currently available plugins you can install. It works similarly to the package lists used by OS-level package managers such as apt.

Update the index periodically so your Krew installation has access to the latest versions of all available plugins:

$ kubectl krew update
Updated the local copy of plugin index.

Installing Plugins

The install command adds new plugins to Kubectl. It can install any of the plugins listed in Krew’s index. Krew takes care of downloading the plugin and registering it with Kubectl.

$ kubectl krew install ctx
Updated the local copy of plugin index.
Installing plugin: ctx
Installed plugin: ctx
…

Krew automatically updates its plugin index before installation, ensuring you get the new plugin’s latest release. Once the install completes, you’ll see some basic information from the plugin’s author at the bottom of the command’s output.

Now you can use the plugin’s commands via the kubectl CLI:

$ kubectl ctx my-context

Updating to New Plugin Releases

One of Krew’s biggest advantages is its integrated plugin update system. Running the upgrade command will refresh the package index and update all your installed plugins to their newest release. This process is fully automatic.

$ kubectl krew upgrade
Updated the local copy of plugin index.
…

You can upgrade plugins individually by passing their names to the upgrade command:

$ kubectl krew upgrade ctx

If you ever want to remove a plugin, supply its name to the uninstall command:

$ kubectl krew uninstall ctx

Krew will ensure the plugin’s completely removed from your system.

The list command shows all your plugins and their installed versions:

~$ kubectl krew list
PLUGIN VERSION
ctx v0.9.4
krew v0.4.3
ns v0.9.4

Krew itself appears in the plugin list and is supported by the update system. Running upgrade or upgrade krew will fetch and install the latest Krew release before your plugins are updated.

Searching for Plugins

The search command lets you browse the Krew package index from your terminal.

~$ kubectl krew search cert-manager
NAME DESCRIPTION INSTALLED
cert-manager Manage cert-manager resources inside your cluster no

Once you’ve found a plugin you’re interested in, run the info command to find out more about it. This reveals the plugin’s current version number, a link to its website, and a short description supplied by the author.

~$ kubectl krew info cert-manager
NAME: cert-manager
INDEX: default
URI: https://github.com/jetstack/cert-manager/releases/download/v1.7.0/kubectl-cert_manager-linux-amd64.tar.gz
SHA256: 73618617b9ec42994c3ea77bbc8be743e382501d42ad2ee7aeca0d32c15655c0
VERSION: v1.7.0
HOMEPAGE: https://github.com/jetstack/cert-manager
DESCRIPTION:
The official plugin accompanying cert-manger, a Kubernetes add-on to
automate the management and issuance of TLS certificates. Allows for
direct interaction with cert-manager resources e.g. manual renewal of
Certificate resources.

Using Custom Indexes

Krew supports custom indexes that facilitate plugin installation from your own sources. Indexes are simply Git repositories with a plugins folder containing YAML manifests. These files define the plugins that are available for installation. The structure of Krew’s default index is a useful model when you’re setting up your own.

To add an index, pass its repository URL to the index add command:

$ kubectl krew index add custom-index https://example.com/krew/index.git

To reference plugins in your index, prefix their names with your chosen index name:

$ kubectl krew install custom-index/example-plugin

When no prefix is given, Krew uses the default/ prefix instead. This always refers to Krew’s built-in plugin index. If you’d prefer to direct unprefixed plugin names to your own index, set the KREW_DEFAULT_INDEX_URI environment variable to your repository’s URL:

$ export KREW_DEFAULT_INDEX_URI=”https://example.com/krew/index.git”

# Automatically resolved to the custom index
$ kubectl krew install example-plugin

Publishing Your Own Plugins

It’s fairly straightforward to distribute your own plugins to users via Krew. First you need to create an archive of your Kubectl plugin’s content, either as a .tar.gz or .zip file. Upload this to a publicly accessible location – your project’s website or GitHub releases page are both good choices.

Write a Krew plugin manifest next. This is a simple YAML file which provides basic information about your plugin such as its name, description, and current version. The manifest also includes your plugin archive’s public URL. When a user installs your plugin, Krew will fetch its archive from the URL specified in the manifest.

Once you’ve written your manifest, you can commit it to a Git repository. Add that repository as a custom Krew index to add your plugin to your Kubectl installation. Submissions to Krew’s public index are accepted by creating a pull request to its repository that adds your manifest in the plugins directory.

Conclusion

Krew simplifies Kubernetes plugin discovery, installation, and management. It’s a handy convenience tool for anyone using Kubectl plugins. Krew offers a full package management experience that includes custom private indexes for your internal tools.

The public index contains over 180 plugins covering all aspects of Kubernetes management. Some popular options include cert-manager, for working with Cert-Manager objects in your cluster, tail, offering simplified log streaming, score for static analysis of your objects, and ctx and ns to streamline switching between contexts and namespaces.



Source by www.howtogeek.com

Related Posts

How to Use the Text Command Excel
How To

How to Use the Text Command Excel

November 22, 2023
How to Communicate with Beeper Codes
How To

How to Communicate with Beeper Codes

November 4, 2024
transfer whatsapp from android to iphone
Articles

How to Transfer WhatsApp from Android to iPhone!

October 6, 2023
How to prevent phishing attacks
How To

How to Prevent Phishing Attacks: Safeguarding Your Digital Identity

May 14, 2023

Recommended.

What apps to use if you leave Twitter

What apps to use if you leave Twitter

October 29, 2022
Apple's invitation to its iPhone 14 launch event.

What is the iPhone 14 launch event teaser all about?

August 25, 2022

Trending.

No Content Available
  • Home
  • About
  • Contact
  • Privacy
  • Terms
  • DCMA
  • Write For Us / Submit
Contact us for submission queries. editor[at]geekyinsider.com.
No Result
View All Result
  • Home
  • Review
  • Apple
  • Gaming
  • Gadget and Gear
    • Camera
    • Smartphone
  • Microsoft
  • Security