-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
<channel> | ||
<title>SIG CLI – Extending Kubectl</title> | ||
<link>https://kubernetes-sigs.github.io/cli-experimental/documentation/extending_kubectl/</link> | ||
<description>Recent content in Extending Kubectl on SIG CLI</description> | ||
<generator>Hugo -- gohugo.io</generator> | ||
|
||
<atom:link href="https://kubernetes-sigs.github.io/cli-experimental/documentation/extending_kubectl/index.xml" rel="self" type="application/rss+xml" /> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<item> | ||
<title>Documentation: Plugin Mechanism</title> | ||
<link>https://kubernetes-sigs.github.io/cli-experimental/documentation/extending_kubectl/plugin_mechanism/</link> | ||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> | ||
|
||
<guid>https://kubernetes-sigs.github.io/cli-experimental/documentation/extending_kubectl/plugin_mechanism/</guid> | ||
<description> | ||
|
||
|
||
|
||
|
||
<div class="alert alert-success" role="alert"> | ||
<h4 class="alert-heading">TL;DR</h4> | ||
<ul> | ||
<li>Drop executables named <code>kubectl-plugin_name</code> on your <code>PATH</code> and invoke with <code>kubectl plugin-name</code></li> | ||
<li><code>kubectl plugin list</code> shows available plugins</li> | ||
</ul> | ||
|
||
</div> | ||
|
||
<h1 id="kubectl-plugins">Kubectl plugins</h1> | ||
<p>Kubectl plugins are a lightweight mechanism to extend <code>kubectl</code> with custom functionality to suit your needs.</p> | ||
<h2 id="plugin-mechanism">Plugin mechanism</h2> | ||
<p>As of version 1.12, kubectl has a simple plugin mechanism to expose binaries on your <code>PATH</code> as kubectl subcommands. | ||
When invoking an unknown subcommand <code>kubectl my-plugin</code>, kubectl starts searching for an executable named <code>kubectl-my_plugin</code> on your <code>PATH</code>. | ||
Note how the dash is mapped to an underscore. This is to enable plugins that are invoked by multiple words, for example | ||
<code>kubectl my plugin</code> would trigger a search for the commands <code>kubectl-my-plugin</code> or <code>kubectl-my</code>. The more specific match | ||
always wins over the other, so if both <code>kubectl-my</code> and <code>kubectl-my-plugin</code> exist, the latter will be called. | ||
When a matching executable is found, kubectl calls it, forwarding all extra arguments.</p> | ||
<p>The reference on <a href="https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/">kubernetes.io</a> knows more.</p> | ||
|
||
|
||
<div class="alert alert-success" role="alert"> | ||
<h4 class="alert-heading">Windows compatibility</h4> | ||
On windows, the minimum required version to use the plugin mechanism is 1.14. | ||
</div> | ||
|
||
<p>Listing installed plugins</p> | ||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl plugin list | ||
</code></pre></div> | ||
</description> | ||
</item> | ||
|
||
<item> | ||
<title>Documentation: Discovering Plugins</title> | ||
<link>https://kubernetes-sigs.github.io/cli-experimental/documentation/extending_kubectl/discovering_plugins/</link> | ||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> | ||
|
||
<guid>https://kubernetes-sigs.github.io/cli-experimental/documentation/extending_kubectl/discovering_plugins/</guid> | ||
<description> | ||
|
||
|
||
|
||
|
||
<div class="alert alert-success" role="alert"> | ||
<h4 class="alert-heading">TL;DR</h4> | ||
<ul> | ||
<li><a href="https://krew.sigs.k8s.io/docs/user-guide/setup/install/">krew.sigs.k8s.io</a> is a kubernetes sub-project to discover and manage plugins</li> | ||
</ul> | ||
|
||
</div> | ||
|
||
<h1 id="krew">Krew</h1> | ||
<p>By design, <code>kubectl</code> does not install plugins. This task is left to the kubernetes sub-project | ||
<a href="https://krew.sigs.k8s.io/docs/user-guide/setup/install/">krew.sigs.k8s.io</a> which needs to be installed separately. | ||
Krew helps to</p> | ||
<ul> | ||
<li>discover plugins</li> | ||
<li>get updates for installed plugins</li> | ||
<li>remove plugins</li> | ||
</ul> | ||
<h2 id="installing-krew">Installing krew</h2> | ||
<p>Krew should be used as a kubectl plugin. To set yourself up to using krew, you need to do two things:</p> | ||
<ol> | ||
<li>Install git</li> | ||
<li>Install krew as described on the project page <a href="https://krew.sigs.k8s.io/docs/user-guide/setup/install/">krew.sigs.k8s.io</a>.</li> | ||
<li>Add the krew bin folder to your <code>PATH</code> environment variable. For example, in bash <code>export PATH=&quot;${KREW_ROOT:-$HOME/.krew}/bin:$PATH&quot;</code>.</li> | ||
</ol> | ||
<h2 id="krew-capabilities">Krew capabilities</h2> | ||
<p>Discover plugins</p> | ||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl krew search | ||
</code></pre></div><p>Install a plugin</p> | ||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl krew install access-matrix | ||
</code></pre></div><p>Upgrade all installed plugins</p> | ||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl krew upgrade | ||
</code></pre></div><p>Show details about a plugin</p> | ||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl krew info access-matrix | ||
</code></pre></div><p>Uninstall a plugin</p> | ||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl krew uninstall access-matrix | ||
</code></pre></div> | ||
</description> | ||
</item> | ||
|
||
</channel> | ||
</rss> |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
<channel> | ||
<title>SIG CLI – temp</title> | ||
<link>https://kubernetes-sigs.github.io/cli-experimental/documentation/</link> | ||
<description>Recent content in temp on SIG CLI</description> | ||
<generator>Hugo -- gohugo.io</generator> | ||
|
||
<atom:link href="https://kubernetes-sigs.github.io/cli-experimental/documentation/index.xml" rel="self" type="application/rss+xml" /> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</channel> | ||
</rss> |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.