KubectlConfigRenameContextSettings Class

Summary

Renames a context from the kubeconfig file. CONTEXT_NAME is the context name that you wish change. NEW_NAME is the new name you wish to set. Note: In case the context being renamed is the 'current-context', this field will also be updated.
Assembly
Cake.Kubectl.dll
Namespace
Cake.Kubectl
Base Types
graph BT Type-->Base0["AutoToolSettings"] click Base0 "/api/Cake.Kubectl/AutoToolSettings" Base0-->Base1["ToolSettings"] Type["KubectlConfigRenameContextSettings"] class Type type-node

Syntax

public sealed class KubectlConfigRenameContextSettings : AutoToolSettings

Examples

# Rename the context 'old-name' to 'new-name' in your kubeconfig file kubectl config rename-context old-name new-name

Attributes

Type Description
CompilerGeneratedAttribute

Constructors

Extension Methods

Name Value Summary
Dump<KubectlConfigRenameContextSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<KubectlConfigRenameContextSettings>(KubectlConfigRenameContextSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<KubectlConfigRenameContextSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<KubectlConfigRenameContextSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<KubectlConfigRenameContextSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<KubectlConfigRenameContextSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin