Kubectl config: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 29: Line 29:


==<tt>rename-context</tt>==
==<tt>rename-context</tt>==
Renames a context from the .kube/conf file:
<syntaxhighlight lang='bash'>
kubectl config rename-context <old-context-name> <new-context-name>
</syntaxhighlight>
In case the context being updated is the current context, the current context will also be updated.

Revision as of 04:17, 10 April 2021

Internal

Overview

current-context

Displays the current context:

kubectl config current-context

use-context

Sets the current context:

kubectl config use-context <new-context-name>

view

Displays the content of ~/.kube/cofig:

kubectl config view

rename-context

Renames a context from the .kube/conf file:

kubectl config rename-context <old-context-name> <new-context-name>

In case the context being updated is the current context, the current context will also be updated.