KubectlAliases Class

Summary

Contains functionality for working with Kubectl commands.
Assembly
Cake.Kubectl.dll
Namespace
Cake.Kubectl
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["KubectlAliases"] class Type type-node

Syntax

public static class KubectlAliases

Attributes

Type Description
NullableContextAttribute
NullableAttribute
CakeAliasCategoryAttribute

Methods

Name Value Summary
KubectlAnnotate(ICakeContext, KubectlAnnotateSettings) void
Update the annotations on one or more resources. All Kubernetes objects support the ability to store additional data with the object as annotations. Annotations are key/value pairs that can be larger than labels and include arbitrary string values such as structured JSON. Tools and system extensions may use annotations to store their own data. Attempting to set an annotation that already exists will fail unless --overwrite is set. If --resource-version is specified and does not match the current resource version on the server the command will fail.
static
KubectlAnnotateWithResult(ICakeContext, KubectlAnnotateSettings) IEnumerable<string>
Update the annotations on one or more resources. All Kubernetes objects support the ability to store additional data with the object as annotations. Annotations are key/value pairs that can be larger than labels and include arbitrary string values such as structured JSON. Tools and system extensions may use annotations to store their own data. Attempting to set an annotation that already exists will fail unless --overwrite is set. If --resource-version is specified and does not match the current resource version on the server the command will fail.
static
KubectlApiResources(ICakeContext, KubectlApiResourcesSettings) void
Print the supported API resources on the server.
static
KubectlApiResourcesWithResult(ICakeContext, KubectlApiResourcesSettings) IEnumerable<string>
Print the supported API resources on the server.
static
KubectlApiVersions(ICakeContext, KubectlApiVersionsSettings) void
Print the supported API versions on the server, in the form of "group/version".
static
KubectlApiVersionsWithResult(ICakeContext, KubectlApiVersionsSettings) IEnumerable<string>
Print the supported API versions on the server, in the form of "group/version".
static
KubectlApply(ICakeContext, KubectlApplySettings) void
Apply a configuration to a resource by file name or stdin. The resource name must be specified. This resource will be created if it doesn't exist yet. To use 'apply', always create the resource initially with either 'apply' or 'create --save-config'. JSON and YAML formats are accepted. Alpha Disclaimer: the --prune functionality is not yet complete. Do not use unless you are aware of what the current state is. See https://issues.k8s.io/34274.
static
KubectlApplyEditLastApplied(ICakeContext, KubectlApplyEditLastAppliedSettings) void
Edit the latest last-applied-configuration annotations of resources from the default editor. The edit-last-applied command allows you to directly edit any API resource you can retrieve via the command-line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. You can edit multiple objects, although changes are applied one at a time. The command accepts file names as well as command-line arguments, although the files you point to must be previously saved versions of resources. The default format is YAML. To edit in JSON, specify "-o json". The flag --windows-line-endings can be used to force Windows line endings, otherwise the default for your operating system will be used. In the event an error occurs while updating, a temporary file will be created on disk that contains your unapplied changes. The most common error when updating a resource is another editor changing the resource on the server. When this occurs, you will have to apply your changes to the newer version of the resource, or update your temporary saved copy to include the latest resource version.
static
KubectlApplyEditLastAppliedWithResult(ICakeContext, KubectlApplyEditLastAppliedSettings) IEnumerable<string>
Edit the latest last-applied-configuration annotations of resources from the default editor. The edit-last-applied command allows you to directly edit any API resource you can retrieve via the command-line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. You can edit multiple objects, although changes are applied one at a time. The command accepts file names as well as command-line arguments, although the files you point to must be previously saved versions of resources. The default format is YAML. To edit in JSON, specify "-o json". The flag --windows-line-endings can be used to force Windows line endings, otherwise the default for your operating system will be used. In the event an error occurs while updating, a temporary file will be created on disk that contains your unapplied changes. The most common error when updating a resource is another editor changing the resource on the server. When this occurs, you will have to apply your changes to the newer version of the resource, or update your temporary saved copy to include the latest resource version.
static
KubectlApplySetLastApplied(ICakeContext, KubectlApplySetLastAppliedSettings) void
Set the latest last-applied-configuration annotations by setting it to match the contents of a file. This results in the last-applied-configuration being updated as though 'kubectl apply -f<file> ' was run, without updating any other parts of the object.
static
KubectlApplySetLastAppliedWithResult(ICakeContext, KubectlApplySetLastAppliedSettings) IEnumerable<string>
Set the latest last-applied-configuration annotations by setting it to match the contents of a file. This results in the last-applied-configuration being updated as though 'kubectl apply -f<file> ' was run, without updating any other parts of the object.
static
KubectlApplyViewLastApplied(ICakeContext, KubectlApplyViewLastAppliedSettings) void
View the latest last-applied-configuration annotations by type/name or file. The default output will be printed to stdout in YAML format. You can use the -o option to change the output format.
static
KubectlApplyViewLastAppliedWithResult(ICakeContext, KubectlApplyViewLastAppliedSettings) IEnumerable<string>
View the latest last-applied-configuration annotations by type/name or file. The default output will be printed to stdout in YAML format. You can use the -o option to change the output format.
static
KubectlApplyWithResult(ICakeContext, KubectlApplySettings) IEnumerable<string>
Apply a configuration to a resource by file name or stdin. The resource name must be specified. This resource will be created if it doesn't exist yet. To use 'apply', always create the resource initially with either 'apply' or 'create --save-config'. JSON and YAML formats are accepted. Alpha Disclaimer: the --prune functionality is not yet complete. Do not use unless you are aware of what the current state is. See https://issues.k8s.io/34274.
static
KubectlAttach(ICakeContext, KubectlAttachSettings) void
Attach to a process that is already running inside an existing container.
static
KubectlAttachWithResult(ICakeContext, KubectlAttachSettings) IEnumerable<string>
Attach to a process that is already running inside an existing container.
static
KubectlAuth(ICakeContext, KubectlAuthSettings) void
Inspect authorization
static
KubectlAuthCanI(ICakeContext, KubectlAuthCanISettings) void
Check whether an action is allowed. VERB is a logical Kubernetes API verb like 'get', 'list', 'watch', 'delete', etc. TYPE is a Kubernetes resource. Shortcuts and groups will be resolved. NONRESOURCEURL is a partial URL that starts with "/". NAME is the name of a particular Kubernetes resource. This command pairs nicely with impersonation. See --as global flag.
static
KubectlAuthCanIWithResult(ICakeContext, KubectlAuthCanISettings) IEnumerable<string>
Check whether an action is allowed. VERB is a logical Kubernetes API verb like 'get', 'list', 'watch', 'delete', etc. TYPE is a Kubernetes resource. Shortcuts and groups will be resolved. NONRESOURCEURL is a partial URL that starts with "/". NAME is the name of a particular Kubernetes resource. This command pairs nicely with impersonation. See --as global flag.
static
KubectlAuthReconcile(ICakeContext, KubectlAuthReconcileSettings) void
Reconciles rules for RBAC role, role binding, cluster role, and cluster role binding objects. Missing objects are created, and the containing namespace is created for namespaced objects, if required. Existing roles are updated to include the permissions in the input objects, and remove extra permissions if --remove-extra-permissions is specified. Existing bindings are updated to include the subjects in the input objects, and remove extra subjects if --remove-extra-subjects is specified. This is preferred to 'apply' for RBAC resources so that semantically-aware merging of rules and subjects is done.
static
KubectlAuthReconcileWithResult(ICakeContext, KubectlAuthReconcileSettings) IEnumerable<string>
Reconciles rules for RBAC role, role binding, cluster role, and cluster role binding objects. Missing objects are created, and the containing namespace is created for namespaced objects, if required. Existing roles are updated to include the permissions in the input objects, and remove extra permissions if --remove-extra-permissions is specified. Existing bindings are updated to include the subjects in the input objects, and remove extra subjects if --remove-extra-subjects is specified. This is preferred to 'apply' for RBAC resources so that semantically-aware merging of rules and subjects is done.
static
KubectlAuthWhoami(ICakeContext, KubectlAuthWhoamiSettings) void
Experimental: Check who you are and your attributes (groups, extra). This command is helpful to get yourself aware of the current user attributes, especially when dynamic authentication, e.g., token webhook, auth proxy, or OIDC provider, is enabled in the Kubernetes cluster.
static
KubectlAuthWhoamiWithResult(ICakeContext, KubectlAuthWhoamiSettings) IEnumerable<string>
Experimental: Check who you are and your attributes (groups, extra). This command is helpful to get yourself aware of the current user attributes, especially when dynamic authentication, e.g., token webhook, auth proxy, or OIDC provider, is enabled in the Kubernetes cluster.
static
KubectlAuthWithResult(ICakeContext, KubectlAuthSettings) IEnumerable<string>
Inspect authorization
static
KubectlAutoscale(ICakeContext, KubectlAutoscaleSettings) void
Creates an autoscaler that automatically chooses and sets the number of pods that run in a Kubernetes cluster. Looks up a deployment, replica set, stateful set, or replication controller by name and creates an autoscaler that uses the given resource as a reference. An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.
static
KubectlAutoscaleWithResult(ICakeContext, KubectlAutoscaleSettings) IEnumerable<string>
Creates an autoscaler that automatically chooses and sets the number of pods that run in a Kubernetes cluster. Looks up a deployment, replica set, stateful set, or replication controller by name and creates an autoscaler that uses the given resource as a reference. An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.
static
KubectlCertificate(ICakeContext, KubectlCertificateSettings) void
Modify certificate resources.
static
KubectlCertificateApprove(ICakeContext, KubectlCertificateApproveSettings) void
Approve a certificate signing request. kubectl certificate approve allows a cluster admin to approve a certificate signing request (CSR). This action tells a certificate signing controller to issue a certificate to the requestor with the attributes requested in the CSR. SECURITY NOTICE: Depending on the requested attributes, the issued certificate can potentially grant a requester access to cluster resources or to authenticate as a requested identity. Before approving a CSR, ensure you understand what the signed certificate can do.
static
KubectlCertificateApproveWithResult(ICakeContext, KubectlCertificateApproveSettings) IEnumerable<string>
Approve a certificate signing request. kubectl certificate approve allows a cluster admin to approve a certificate signing request (CSR). This action tells a certificate signing controller to issue a certificate to the requestor with the attributes requested in the CSR. SECURITY NOTICE: Depending on the requested attributes, the issued certificate can potentially grant a requester access to cluster resources or to authenticate as a requested identity. Before approving a CSR, ensure you understand what the signed certificate can do.
static
KubectlCertificateDeny(ICakeContext, KubectlCertificateDenySettings) void
Deny a certificate signing request. kubectl certificate deny allows a cluster admin to deny a certificate signing request (CSR). This action tells a certificate signing controller to not to issue a certificate to the requestor.
static
KubectlCertificateDenyWithResult(ICakeContext, KubectlCertificateDenySettings) IEnumerable<string>
Deny a certificate signing request. kubectl certificate deny allows a cluster admin to deny a certificate signing request (CSR). This action tells a certificate signing controller to not to issue a certificate to the requestor.
static
KubectlCertificateWithResult(ICakeContext, KubectlCertificateSettings) IEnumerable<string>
Modify certificate resources.
static
KubectlClusterInfo(ICakeContext, KubectlClusterInfoSettings) void
Display addresses of the control plane and services with label kubernetes.io/cluster-service=true. To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
static
KubectlClusterInfoDump(ICakeContext, KubectlClusterInfoDumpSettings) void
Dump cluster information out suitable for debugging and diagnosing cluster problems. By default, dumps everything to stdout. You can optionally specify a directory with --output-directory. If you specify a directory, Kubernetes will build a set of files in that directory. By default, only dumps things in the current namespace and 'kube-system' namespace, but you can switch to a different namespace with the --namespaces flag, or specify --all-namespaces to dump all namespaces. The command also dumps the logs of all of the pods in the cluster; these logs are dumped into different directories based on namespace and pod name.
static
KubectlClusterInfoDumpWithResult(ICakeContext, KubectlClusterInfoDumpSettings) IEnumerable<string>
Dump cluster information out suitable for debugging and diagnosing cluster problems. By default, dumps everything to stdout. You can optionally specify a directory with --output-directory. If you specify a directory, Kubernetes will build a set of files in that directory. By default, only dumps things in the current namespace and 'kube-system' namespace, but you can switch to a different namespace with the --namespaces flag, or specify --all-namespaces to dump all namespaces. The command also dumps the logs of all of the pods in the cluster; these logs are dumped into different directories based on namespace and pod name.
static
KubectlClusterInfoWithResult(ICakeContext, KubectlClusterInfoSettings) IEnumerable<string>
Display addresses of the control plane and services with label kubernetes.io/cluster-service=true. To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
static
KubectlCompletion(ICakeContext, KubectlCompletionSettings) void
Output shell completion code for the specified shell (bash, zsh, fish, or powershell). The shell code must be evaluated to provide interactive completion of kubectl commands. This can be done by sourcing it from the .bash_profile. Detailed instructions on how to do this are available here: for macOS: https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/#enable-shell-autocompletion for linux: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#enable-shell-autocompletion for windows: https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/#enable-shell-autocompletion Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2.
static
KubectlCompletionWithResult(ICakeContext, KubectlCompletionSettings) IEnumerable<string>
Output shell completion code for the specified shell (bash, zsh, fish, or powershell). The shell code must be evaluated to provide interactive completion of kubectl commands. This can be done by sourcing it from the .bash_profile. Detailed instructions on how to do this are available here: for macOS: https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/#enable-shell-autocompletion for linux: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#enable-shell-autocompletion for windows: https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/#enable-shell-autocompletion Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2.
static
KubectlConfig(ICakeContext, KubectlConfigSettings) void
Modify kubeconfig files using subcommands like "kubectl config set current-context my-context" The loading order follows these rules: 1. If the --kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takes place. 2. If $KUBECONFIG environment variable is set, then it is used as a list of paths (normal path delimiting rules for your system). These paths are merged. When a value is modified, it is modified in the file that defines the stanza. When a value is created, it is created in the first file that exists. If no files in the chain exist, then it creates the last file in the list. 3. Otherwise, ${HOME}/.kube/config is used and no merging takes place.
static
KubectlConfigCurrentContext(ICakeContext, KubectlConfigCurrentContextSettings) void
Display the current-context.
static
KubectlConfigCurrentContextWithResult(ICakeContext, KubectlConfigCurrentContextSettings) IEnumerable<string>
Display the current-context.
static
KubectlConfigDeleteCluster(ICakeContext, KubectlConfigDeleteClusterSettings) void
Delete the specified cluster from the kubeconfig.
static
KubectlConfigDeleteClusterWithResult(ICakeContext, KubectlConfigDeleteClusterSettings) IEnumerable<string>
Delete the specified cluster from the kubeconfig.
static
KubectlConfigDeleteContext(ICakeContext, KubectlConfigDeleteContextSettings) void
Delete the specified context from the kubeconfig.
static
KubectlConfigDeleteContextWithResult(ICakeContext, KubectlConfigDeleteContextSettings) IEnumerable<string>
Delete the specified context from the kubeconfig.
static
KubectlConfigDeleteUser(ICakeContext, KubectlConfigDeleteUserSettings) void
Delete the specified user from the kubeconfig.
static
KubectlConfigDeleteUserWithResult(ICakeContext, KubectlConfigDeleteUserSettings) IEnumerable<string>
Delete the specified user from the kubeconfig.
static
KubectlConfigGetClusters(ICakeContext, KubectlConfigGetClustersSettings) void
Display clusters defined in the kubeconfig.
static
KubectlConfigGetClustersWithResult(ICakeContext, KubectlConfigGetClustersSettings) IEnumerable<string>
Display clusters defined in the kubeconfig.
static
KubectlConfigGetContexts(ICakeContext, KubectlConfigGetContextsSettings) void
Display one or many contexts from the kubeconfig file.
static
KubectlConfigGetContextsWithResult(ICakeContext, KubectlConfigGetContextsSettings) IEnumerable<string>
Display one or many contexts from the kubeconfig file.
static
KubectlConfigGetUsers(ICakeContext, KubectlConfigGetUsersSettings) void
Display users defined in the kubeconfig.
static
KubectlConfigGetUsersWithResult(ICakeContext, KubectlConfigGetUsersSettings) IEnumerable<string>
Display users defined in the kubeconfig.
static
KubectlConfigRenameContext(ICakeContext, KubectlConfigRenameContextSettings) void
Renames a context from the kubeconfig file. CONTEXT_NAME is the context name that you want to change. NEW_NAME is the new name you want to set. Note: If the context being renamed is the 'current-context', this field will also be updated.
static
KubectlConfigRenameContextWithResult(ICakeContext, KubectlConfigRenameContextSettings) IEnumerable<string>
Renames a context from the kubeconfig file. CONTEXT_NAME is the context name that you want to change. NEW_NAME is the new name you want to set. Note: If the context being renamed is the 'current-context', this field will also be updated.
static
KubectlConfigSet(ICakeContext, KubectlConfigSetSettings) void
Set an individual value in a kubeconfig file. PROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots. PROPERTY_VALUE is the new value you want to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used. Specifying an attribute name that already exists will merge new fields on top of existing values.
static
KubectlConfigSetCluster(ICakeContext, KubectlConfigSetClusterSettings) void
Set a cluster entry in kubeconfig. Specifying a name that already exists will merge new fields on top of existing values for those fields.
static
KubectlConfigSetClusterWithResult(ICakeContext, KubectlConfigSetClusterSettings) IEnumerable<string>
Set a cluster entry in kubeconfig. Specifying a name that already exists will merge new fields on top of existing values for those fields.
static
KubectlConfigSetContext(ICakeContext, KubectlConfigSetContextSettings) void
Set a context entry in kubeconfig. Specifying a name that already exists will merge new fields on top of existing values for those fields.
static
KubectlConfigSetContextWithResult(ICakeContext, KubectlConfigSetContextSettings) IEnumerable<string>
Set a context entry in kubeconfig. Specifying a name that already exists will merge new fields on top of existing values for those fields.
static
KubectlConfigSetCredentials(ICakeContext, KubectlConfigSetCredentialsSettings) void
Set a user entry in kubeconfig. Specifying a name that already exists will merge new fields on top of existing values. Client-certificate flags: --client-certificate=certfile --client-key=keyfile Bearer token flags: --token=bearer_token Basic auth flags: --username=basic_user --password=basic_password Bearer token and basic auth are mutually exclusive.
static
KubectlConfigSetCredentialsWithResult(ICakeContext, KubectlConfigSetCredentialsSettings) IEnumerable<string>
Set a user entry in kubeconfig. Specifying a name that already exists will merge new fields on top of existing values. Client-certificate flags: --client-certificate=certfile --client-key=keyfile Bearer token flags: --token=bearer_token Basic auth flags: --username=basic_user --password=basic_password Bearer token and basic auth are mutually exclusive.
static
KubectlConfigSetWithResult(ICakeContext, KubectlConfigSetSettings) IEnumerable<string>
Set an individual value in a kubeconfig file. PROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots. PROPERTY_VALUE is the new value you want to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used. Specifying an attribute name that already exists will merge new fields on top of existing values.
static
KubectlConfigUnset(ICakeContext, KubectlConfigUnsetSettings) void
Unset an individual value in a kubeconfig file. PROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots.
static
KubectlConfigUnsetWithResult(ICakeContext, KubectlConfigUnsetSettings) IEnumerable<string>
Unset an individual value in a kubeconfig file. PROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots.
static
KubectlConfigUseContext(ICakeContext, KubectlConfigUseContextSettings) void
Set the current-context in a kubeconfig file.
static
KubectlConfigUseContextWithResult(ICakeContext, KubectlConfigUseContextSettings) IEnumerable<string>
Set the current-context in a kubeconfig file.
static
KubectlConfigView(ICakeContext, KubectlConfigViewSettings) void
Display merged kubeconfig settings or a specified kubeconfig file. You can use --output jsonpath={...} to extract specific values using a jsonpath expression.
static
KubectlConfigViewWithResult(ICakeContext, KubectlConfigViewSettings) IEnumerable<string>
Display merged kubeconfig settings or a specified kubeconfig file. You can use --output jsonpath={...} to extract specific values using a jsonpath expression.
static
KubectlConfigWithResult(ICakeContext, KubectlConfigSettings) IEnumerable<string>
Modify kubeconfig files using subcommands like "kubectl config set current-context my-context" The loading order follows these rules: 1. If the --kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takes place. 2. If $KUBECONFIG environment variable is set, then it is used as a list of paths (normal path delimiting rules for your system). These paths are merged. When a value is modified, it is modified in the file that defines the stanza. When a value is created, it is created in the first file that exists. If no files in the chain exist, then it creates the last file in the list. 3. Otherwise, ${HOME}/.kube/config is used and no merging takes place.
static
KubectlCordon(ICakeContext, KubectlCordonSettings) void
Mark node as unschedulable.
static
KubectlCordonWithResult(ICakeContext, KubectlCordonSettings) IEnumerable<string>
Mark node as unschedulable.
static
KubectlCp(ICakeContext, KubectlCpSettings) void
Copy files and directories to and from containers.
static
KubectlCpWithResult(ICakeContext, KubectlCpSettings) IEnumerable<string>
Copy files and directories to and from containers.
static
KubectlCreate(ICakeContext, KubectlCreateSettings) void
Create a resource from a file or from stdin. JSON and YAML formats are accepted.
static
KubectlCreateClusterrole(ICakeContext, KubectlCreateClusterroleSettings) void
Create a cluster role.
static
KubectlCreateClusterrolebinding(ICakeContext, KubectlCreateClusterrolebindingSettings) void
Create a cluster role binding for a particular cluster role.
static
KubectlCreateClusterrolebindingWithResult(ICakeContext, KubectlCreateClusterrolebindingSettings) IEnumerable<string>
Create a cluster role binding for a particular cluster role.
static
KubectlCreateClusterroleWithResult(ICakeContext, KubectlCreateClusterroleSettings) IEnumerable<string>
Create a cluster role.
static
KubectlCreateConfigmap(ICakeContext, KubectlCreateConfigmapSettings) void
Create a config map based on a file, directory, or specified literal value. A single config map may package one or more key/value pairs. When creating a config map based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key, you may specify an alternate key. When creating a config map based on a directory, each file whose basename is a valid key in the directory will be packaged into the config map. Any directory entries except regular files are ignored (e.g. subdirectories, symlinks, devices, pipes, etc).
static
KubectlCreateConfigmapWithResult(ICakeContext, KubectlCreateConfigmapSettings) IEnumerable<string>
Create a config map based on a file, directory, or specified literal value. A single config map may package one or more key/value pairs. When creating a config map based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key, you may specify an alternate key. When creating a config map based on a directory, each file whose basename is a valid key in the directory will be packaged into the config map. Any directory entries except regular files are ignored (e.g. subdirectories, symlinks, devices, pipes, etc).
static
KubectlCreateCronjob(ICakeContext, KubectlCreateCronjobSettings) void
Create a cron job with the specified name.
static
KubectlCreateCronjobWithResult(ICakeContext, KubectlCreateCronjobSettings) IEnumerable<string>
Create a cron job with the specified name.
static
KubectlCreateDeployment(ICakeContext, KubectlCreateDeploymentSettings) void
Create a deployment with the specified name.
static
KubectlCreateDeploymentWithResult(ICakeContext, KubectlCreateDeploymentSettings) IEnumerable<string>
Create a deployment with the specified name.
static
KubectlCreateIngress(ICakeContext, KubectlCreateIngressSettings) void
Create an ingress with the specified name.
static
KubectlCreateIngressWithResult(ICakeContext, KubectlCreateIngressSettings) IEnumerable<string>
Create an ingress with the specified name.
static
KubectlCreateJob(ICakeContext, KubectlCreateJobSettings) void
Create a job with the specified name.
static
KubectlCreateJobWithResult(ICakeContext, KubectlCreateJobSettings) IEnumerable<string>
Create a job with the specified name.
static
KubectlCreateNamespace(ICakeContext, KubectlCreateNamespaceSettings) void
Create a namespace with the specified name.
static
KubectlCreateNamespaceWithResult(ICakeContext, KubectlCreateNamespaceSettings) IEnumerable<string>
Create a namespace with the specified name.
static
KubectlCreatePoddisruptionbudget(ICakeContext, KubectlCreatePoddisruptionbudgetSettings) void
Create a pod disruption budget with the specified name, selector, and desired minimum available pods.
static
KubectlCreatePoddisruptionbudgetWithResult(ICakeContext, KubectlCreatePoddisruptionbudgetSettings) IEnumerable<string>
Create a pod disruption budget with the specified name, selector, and desired minimum available pods.
static
KubectlCreatePriorityclass(ICakeContext, KubectlCreatePriorityclassSettings) void
Create a priority class with the specified name, value, globalDefault and description.
static
KubectlCreatePriorityclassWithResult(ICakeContext, KubectlCreatePriorityclassSettings) IEnumerable<string>
Create a priority class with the specified name, value, globalDefault and description.
static
KubectlCreateQuota(ICakeContext, KubectlCreateQuotaSettings) void
Create a resource quota with the specified name, hard limits, and optional scopes.
static
KubectlCreateQuotaWithResult(ICakeContext, KubectlCreateQuotaSettings) IEnumerable<string>
Create a resource quota with the specified name, hard limits, and optional scopes.
static
KubectlCreateRole(ICakeContext, KubectlCreateRoleSettings) void
Create a role with single rule.
static
KubectlCreateRolebinding(ICakeContext, KubectlCreateRolebindingSettings) void
Create a role binding for a particular role or cluster role.
static
KubectlCreateRolebindingWithResult(ICakeContext, KubectlCreateRolebindingSettings) IEnumerable<string>
Create a role binding for a particular role or cluster role.
static
KubectlCreateRoleWithResult(ICakeContext, KubectlCreateRoleSettings) IEnumerable<string>
Create a role with single rule.
static
KubectlCreateSecret(ICakeContext, KubectlCreateSecretSettings) void
Create a secret using specified subcommand.
static
KubectlCreateSecretDockerRegistry(ICakeContext, KubectlCreateSecretDockerRegistrySettings) void
Create a new secret for use with Docker registries. Dockercfg secrets are used to authenticate against Docker registries. When using the Docker command line to push images, you can authenticate to a given registry by running: '$ docker login DOCKER_REGISTRY_SERVER --username=DOCKER_USER --password=DOCKER_PASSWORD --email=DOCKER_EMAIL'. That produces a ~/.dockercfg file that is used by subsequent 'docker push' and 'docker pull' commands to authenticate to the registry. The email address is optional. When creating applications, you may have a Docker registry that requires authentication. In order for the nodes to pull images on your behalf, they must have the credentials. You can provide this information by creating a dockercfg secret and attaching it to your service account.
static
KubectlCreateSecretDockerRegistryWithResult(ICakeContext, KubectlCreateSecretDockerRegistrySettings) IEnumerable<string>
Create a new secret for use with Docker registries. Dockercfg secrets are used to authenticate against Docker registries. When using the Docker command line to push images, you can authenticate to a given registry by running: '$ docker login DOCKER_REGISTRY_SERVER --username=DOCKER_USER --password=DOCKER_PASSWORD --email=DOCKER_EMAIL'. That produces a ~/.dockercfg file that is used by subsequent 'docker push' and 'docker pull' commands to authenticate to the registry. The email address is optional. When creating applications, you may have a Docker registry that requires authentication. In order for the nodes to pull images on your behalf, they must have the credentials. You can provide this information by creating a dockercfg secret and attaching it to your service account.
static
KubectlCreateSecretGeneric(ICakeContext, KubectlCreateSecretGenericSettings) void
Create a secret based on a file, directory, or specified literal value. A single secret may package one or more key/value pairs. When creating a secret based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key or you wish to chose your own, you may specify an alternate key. When creating a secret based on a directory, each file whose basename is a valid key in the directory will be packaged into the secret. Any directory entries except regular files are ignored (e.g. subdirectories, symlinks, devices, pipes, etc).
static
KubectlCreateSecretGenericWithResult(ICakeContext, KubectlCreateSecretGenericSettings) IEnumerable<string>
Create a secret based on a file, directory, or specified literal value. A single secret may package one or more key/value pairs. When creating a secret based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key or you wish to chose your own, you may specify an alternate key. When creating a secret based on a directory, each file whose basename is a valid key in the directory will be packaged into the secret. Any directory entries except regular files are ignored (e.g. subdirectories, symlinks, devices, pipes, etc).
static
KubectlCreateSecretTls(ICakeContext, KubectlCreateSecretTlsSettings) void
Create a TLS secret from the given public/private key pair. The public/private key pair must exist beforehand. The public key certificate must be .PEM encoded and match the given private key.
static
KubectlCreateSecretTlsWithResult(ICakeContext, KubectlCreateSecretTlsSettings) IEnumerable<string>
Create a TLS secret from the given public/private key pair. The public/private key pair must exist beforehand. The public key certificate must be .PEM encoded and match the given private key.
static
KubectlCreateSecretWithResult(ICakeContext, KubectlCreateSecretSettings) IEnumerable<string>
Create a secret using specified subcommand.
static
KubectlCreateService(ICakeContext, KubectlCreateServiceSettings) void
Create a service using a specified subcommand.
static
KubectlCreateServiceaccount(ICakeContext, KubectlCreateServiceaccountSettings) void
Create a service account with the specified name.
static
KubectlCreateServiceaccountWithResult(ICakeContext, KubectlCreateServiceaccountSettings) IEnumerable<string>
Create a service account with the specified name.
static
KubectlCreateServiceClusterip(ICakeContext, KubectlCreateServiceClusteripSettings) void
Create a ClusterIP service with the specified name.
static
KubectlCreateServiceClusteripWithResult(ICakeContext, KubectlCreateServiceClusteripSettings) IEnumerable<string>
Create a ClusterIP service with the specified name.
static
KubectlCreateServiceExternalname(ICakeContext, KubectlCreateServiceExternalnameSettings) void
Create an ExternalName service with the specified name. ExternalName service references to an external DNS address instead of only pods, which will allow application authors to reference services that exist off platform, on other clusters, or locally.
static
KubectlCreateServiceExternalnameWithResult(ICakeContext, KubectlCreateServiceExternalnameSettings) IEnumerable<string>
Create an ExternalName service with the specified name. ExternalName service references to an external DNS address instead of only pods, which will allow application authors to reference services that exist off platform, on other clusters, or locally.
static
KubectlCreateServiceLoadbalancer(ICakeContext, KubectlCreateServiceLoadbalancerSettings) void
Create a LoadBalancer service with the specified name.
static
KubectlCreateServiceLoadbalancerWithResult(ICakeContext, KubectlCreateServiceLoadbalancerSettings) IEnumerable<string>
Create a LoadBalancer service with the specified name.
static
KubectlCreateServiceNodeport(ICakeContext, KubectlCreateServiceNodeportSettings) void
Create a NodePort service with the specified name.
static
KubectlCreateServiceNodeportWithResult(ICakeContext, KubectlCreateServiceNodeportSettings) IEnumerable<string>
Create a NodePort service with the specified name.
static
KubectlCreateServiceWithResult(ICakeContext, KubectlCreateServiceSettings) IEnumerable<string>
Create a service using a specified subcommand.
static
KubectlCreateToken(ICakeContext, KubectlCreateTokenSettings) void
Request a service account token.
static
KubectlCreateTokenWithResult(ICakeContext, KubectlCreateTokenSettings) IEnumerable<string>
Request a service account token.
static
KubectlCreateWithResult(ICakeContext, KubectlCreateSettings) IEnumerable<string>
Create a resource from a file or from stdin. JSON and YAML formats are accepted.
static
KubectlDelete(ICakeContext, KubectlDeleteSettings) void
Delete resources by file names, stdin, resources and names, or by resources and label selector. JSON and YAML formats are accepted. Only one type of argument may be specified: file names, resources and names, or resources and label selector. Some resources, such as pods, support graceful deletion. These resources define a default period before they are forcibly terminated (the grace period) but you may override that value with the --grace-period flag, or pass --now to set a grace-period of 1. Because these resources often represent entities in the cluster, deletion may not be acknowledged immediately. If the node hosting a pod is down or cannot reach the API server, termination may take significantly longer than the grace period. To force delete a resource, you must specify the --force flag. Note: only a subset of resources support graceful deletion. In absence of the support, the --grace-period flag is ignored. IMPORTANT: Force deleting pods does not wait for confirmation that the pod's processes have been terminated, which can leave those processes running until the node detects the deletion and completes graceful deletion. If your processes use shared storage or talk to a remote API and depend on the name of the pod to identify themselves, force deleting those pods may result in multiple processes running on different machines using the same identification which may lead to data corruption or inconsistency. Only force delete pods when you are sure the pod is terminated, or if your application can tolerate multiple copies of the same pod running at once. Also, if you force delete pods, the scheduler may place new pods on those nodes before the node has released those resources and causing those pods to be evicted immediately. Note that the delete command does NOT do resource version checks, so if someone submits an update to a resource right when you submit a delete, their update will be lost along with the rest of the resource. After a CustomResourceDefinition is deleted, invalidation of discovery cache may take up to 6 hours. If you don't want to wait, you might want to run "kubectl api-resources" to refresh the discovery cache.
static
KubectlDeleteWithResult(ICakeContext, KubectlDeleteSettings) IEnumerable<string>
Delete resources by file names, stdin, resources and names, or by resources and label selector. JSON and YAML formats are accepted. Only one type of argument may be specified: file names, resources and names, or resources and label selector. Some resources, such as pods, support graceful deletion. These resources define a default period before they are forcibly terminated (the grace period) but you may override that value with the --grace-period flag, or pass --now to set a grace-period of 1. Because these resources often represent entities in the cluster, deletion may not be acknowledged immediately. If the node hosting a pod is down or cannot reach the API server, termination may take significantly longer than the grace period. To force delete a resource, you must specify the --force flag. Note: only a subset of resources support graceful deletion. In absence of the support, the --grace-period flag is ignored. IMPORTANT: Force deleting pods does not wait for confirmation that the pod's processes have been terminated, which can leave those processes running until the node detects the deletion and completes graceful deletion. If your processes use shared storage or talk to a remote API and depend on the name of the pod to identify themselves, force deleting those pods may result in multiple processes running on different machines using the same identification which may lead to data corruption or inconsistency. Only force delete pods when you are sure the pod is terminated, or if your application can tolerate multiple copies of the same pod running at once. Also, if you force delete pods, the scheduler may place new pods on those nodes before the node has released those resources and causing those pods to be evicted immediately. Note that the delete command does NOT do resource version checks, so if someone submits an update to a resource right when you submit a delete, their update will be lost along with the rest of the resource. After a CustomResourceDefinition is deleted, invalidation of discovery cache may take up to 6 hours. If you don't want to wait, you might want to run "kubectl api-resources" to refresh the discovery cache.
static
KubectlDescribe(ICakeContext, KubectlDescribeSettings) void
Show details of a specific resource or group of resources. Print a detailed description of the selected resources, including related resources such as events or controllers. You may select a single object by name, all objects of that type, provide a name prefix, or label selector. For example: $ kubectl describe TYPE NAME_PREFIX will first check for an exact match on TYPE and NAME_PREFIX. If no such resource exists, it will output details for every resource that has a name prefixed with NAME_PREFIX.
static
KubectlDescribeWithResult(ICakeContext, KubectlDescribeSettings) IEnumerable<string>
Show details of a specific resource or group of resources. Print a detailed description of the selected resources, including related resources such as events or controllers. You may select a single object by name, all objects of that type, provide a name prefix, or label selector. For example: $ kubectl describe TYPE NAME_PREFIX will first check for an exact match on TYPE and NAME_PREFIX. If no such resource exists, it will output details for every resource that has a name prefixed with NAME_PREFIX.
static
KubectlDiff(ICakeContext, KubectlDiffSettings) void
Diff configurations specified by file name or stdin between the current online configuration, and the configuration as it would be if applied. The output is always YAML. KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own diff command. Users can use external commands with params too, example: KUBECTL_EXTERNAL_DIFF="colordiff -N -u" By default, the "diff" command available in your path will be run with the "-u" (unified diff) and "-N" (treat absent files as empty) options. Exit status: 0 No differences were found. 1 Differences were found. >1 Kubectl or diff failed with an error. Note: KUBECTL_EXTERNAL_DIFF, if used, is expected to follow that convention.
static
KubectlDiffWithResult(ICakeContext, KubectlDiffSettings) IEnumerable<string>
Diff configurations specified by file name or stdin between the current online configuration, and the configuration as it would be if applied. The output is always YAML. KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own diff command. Users can use external commands with params too, example: KUBECTL_EXTERNAL_DIFF="colordiff -N -u" By default, the "diff" command available in your path will be run with the "-u" (unified diff) and "-N" (treat absent files as empty) options. Exit status: 0 No differences were found. 1 Differences were found. >1 Kubectl or diff failed with an error. Note: KUBECTL_EXTERNAL_DIFF, if used, is expected to follow that convention.
static
KubectlDrain(ICakeContext, KubectlDrainSettings) void
Drain node in preparation for maintenance. The given node will be marked unschedulable to prevent new pods from arriving. 'drain' evicts the pods if the API server supports https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ eviction https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ . Otherwise, it will use normal DELETE to delete the pods. The 'drain' evicts or deletes all pods except mirror pods (which cannot be deleted through the API server). If there are daemon set-managed pods, drain will not proceed without --ignore-daemonsets, and regardless it will not delete any daemon set-managed pods, because those pods would be immediately replaced by the daemon set controller, which ignores unschedulable markings. If there are any pods that are neither mirror pods nor managed by a replication controller, replica set, daemon set, stateful set, or job, then drain will not delete any pods unless you use --force. --force will also allow deletion to proceed if the managing resource of one or more pods is missing. 'drain' waits for graceful termination. You should not operate on the machine until the command completes. When you are ready to put the node back into service, use kubectl uncordon, which will make the node schedulable again.
static
KubectlDrainWithResult(ICakeContext, KubectlDrainSettings) IEnumerable<string>
Drain node in preparation for maintenance. The given node will be marked unschedulable to prevent new pods from arriving. 'drain' evicts the pods if the API server supports https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ eviction https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ . Otherwise, it will use normal DELETE to delete the pods. The 'drain' evicts or deletes all pods except mirror pods (which cannot be deleted through the API server). If there are daemon set-managed pods, drain will not proceed without --ignore-daemonsets, and regardless it will not delete any daemon set-managed pods, because those pods would be immediately replaced by the daemon set controller, which ignores unschedulable markings. If there are any pods that are neither mirror pods nor managed by a replication controller, replica set, daemon set, stateful set, or job, then drain will not delete any pods unless you use --force. --force will also allow deletion to proceed if the managing resource of one or more pods is missing. 'drain' waits for graceful termination. You should not operate on the machine until the command completes. When you are ready to put the node back into service, use kubectl uncordon, which will make the node schedulable again.
static
KubectlEdit(ICakeContext, KubectlEditSettings) void
Edit a resource from the default editor. The edit command allows you to directly edit any API resource you can retrieve via the command-line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. You can edit multiple objects, although changes are applied one at a time. The command accepts file names as well as command-line arguments, although the files you point to must be previously saved versions of resources. Editing is done with the API version used to fetch the resource. To edit using a specific API version, fully-qualify the resource, version, and group. The default format is YAML. To edit in JSON, specify "-o json". The flag --windows-line-endings can be used to force Windows line endings, otherwise the default for your operating system will be used. In the event an error occurs while updating, a temporary file will be created on disk that contains your unapplied changes. The most common error when updating a resource is another editor changing the resource on the server. When this occurs, you will have to apply your changes to the newer version of the resource, or update your temporary saved copy to include the latest resource version.
static
KubectlEditWithResult(ICakeContext, KubectlEditSettings) IEnumerable<string>
Edit a resource from the default editor. The edit command allows you to directly edit any API resource you can retrieve via the command-line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. You can edit multiple objects, although changes are applied one at a time. The command accepts file names as well as command-line arguments, although the files you point to must be previously saved versions of resources. Editing is done with the API version used to fetch the resource. To edit using a specific API version, fully-qualify the resource, version, and group. The default format is YAML. To edit in JSON, specify "-o json". The flag --windows-line-endings can be used to force Windows line endings, otherwise the default for your operating system will be used. In the event an error occurs while updating, a temporary file will be created on disk that contains your unapplied changes. The most common error when updating a resource is another editor changing the resource on the server. When this occurs, you will have to apply your changes to the newer version of the resource, or update your temporary saved copy to include the latest resource version.
static
KubectlEvents(ICakeContext, KubectlEventsSettings) void
Display events Prints a table of the most important information about events. You can request events for a namespace, for all namespace, or filtered to only those pertaining to a specified resource.
static
KubectlEventsWithResult(ICakeContext, KubectlEventsSettings) IEnumerable<string>
Display events Prints a table of the most important information about events. You can request events for a namespace, for all namespace, or filtered to only those pertaining to a specified resource.
static
KubectlExec(ICakeContext, KubectlExecSettings) void
Execute a command in a container.
static
KubectlExecWithResult(ICakeContext, KubectlExecSettings) IEnumerable<string>
Execute a command in a container.
static
KubectlExplain(ICakeContext, KubectlExplainSettings) void
List the fields for supported resources. This command describes the fields associated with each supported API resource. Fields are identified via a simple JSONPath identifier: <type>.<fieldName>[.<fieldName>] Add the --recursive flag to display all of the fields at once without descriptions. Information about each field is retrieved from the server in OpenAPI format.
static
KubectlExplainWithResult(ICakeContext, KubectlExplainSettings) IEnumerable<string>
List the fields for supported resources. This command describes the fields associated with each supported API resource. Fields are identified via a simple JSONPath identifier: <type>.<fieldName>[.<fieldName>] Add the --recursive flag to display all of the fields at once without descriptions. Information about each field is retrieved from the server in OpenAPI format.
static
KubectlExpose(ICakeContext, KubectlExposeSettings) void
Expose a resource as a new Kubernetes service. Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector for that resource as the selector for a new service on the specified port. A deployment or replica set will be exposed as a service only if its selector is convertible to a selector that service supports, i.e. when the selector contains only the matchLabels component. Note that if no port is specified via --port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no labels are specified, the new service will re-use the labels from the resource it exposes. Possible resources include (case insensitive): pod (po), service (svc), replicationcontroller (rc), deployment (deploy), replicaset (rs)
static
KubectlExposeWithResult(ICakeContext, KubectlExposeSettings) IEnumerable<string>
Expose a resource as a new Kubernetes service. Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector for that resource as the selector for a new service on the specified port. A deployment or replica set will be exposed as a service only if its selector is convertible to a selector that service supports, i.e. when the selector contains only the matchLabels component. Note that if no port is specified via --port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no labels are specified, the new service will re-use the labels from the resource it exposes. Possible resources include (case insensitive): pod (po), service (svc), replicationcontroller (rc), deployment (deploy), replicaset (rs)
static
KubectlGet(ICakeContext, KubectlGetSettings) void
Display one or many resources. Prints a table of the most important information about the specified resources. You can filter the list using a label selector and the --selector flag. If the desired resource type is namespaced you will only see results in your current namespace unless you pass --all-namespaces. By specifying the output as 'template' and providing a Go template as the value of the --template flag, you can filter the attributes of the fetched resources.
static
KubectlGetWithResult(ICakeContext, KubectlGetSettings) IEnumerable<string>
Display one or many resources. Prints a table of the most important information about the specified resources. You can filter the list using a label selector and the --selector flag. If the desired resource type is namespaced you will only see results in your current namespace unless you pass --all-namespaces. By specifying the output as 'template' and providing a Go template as the value of the --template flag, you can filter the attributes of the fetched resources.
static
KubectlKustomize(ICakeContext, KubectlKustomizeSettings) void
Build a set of KRM resources using a 'kustomization.yaml' file. The DIR argument must be a path to a directory containing 'kustomization.yaml', or a git repository URL with a path suffix specifying same with respect to the repository root. If DIR is omitted, '.' is assumed.
static
KubectlKustomizeWithResult(ICakeContext, KubectlKustomizeSettings) IEnumerable<string>
Build a set of KRM resources using a 'kustomization.yaml' file. The DIR argument must be a path to a directory containing 'kustomization.yaml', or a git repository URL with a path suffix specifying same with respect to the repository root. If DIR is omitted, '.' is assumed.
static
KubectlLabel(ICakeContext, KubectlLabelSettings) void
Update the labels on a resource. * A label key and value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters each. * Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app. * If --overwrite is true, then existing labels can be overwritten, otherwise attempting to overwrite a label will result in an error. * If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used.
static
KubectlLabelWithResult(ICakeContext, KubectlLabelSettings) IEnumerable<string>
Update the labels on a resource. * A label key and value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters each. * Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app. * If --overwrite is true, then existing labels can be overwritten, otherwise attempting to overwrite a label will result in an error. * If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used.
static
KubectlLogs(ICakeContext, KubectlLogsSettings) void
Print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional.
static
KubectlLogsWithResult(ICakeContext, KubectlLogsSettings) IEnumerable<string>
Print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional.
static
KubectlPatch(ICakeContext, KubectlPatchSettings) void
Update fields of a resource using strategic merge patch, a JSON merge patch, or a JSON patch. JSON and YAML formats are accepted. Note: Strategic merge patch is not supported for custom resources.
static
KubectlPatchWithResult(ICakeContext, KubectlPatchSettings) IEnumerable<string>
Update fields of a resource using strategic merge patch, a JSON merge patch, or a JSON patch. JSON and YAML formats are accepted. Note: Strategic merge patch is not supported for custom resources.
static
KubectlPlugin(ICakeContext, KubectlPluginSettings) void
Provides utilities for interacting with plugins. Plugins provide extended functionality that is not part of the major command-line distribution. Please refer to the documentation and examples for more information about how write your own plugins. The easiest way to discover and install plugins is via the kubernetes sub-project krew. To install krew, visit https://krew.sigs.k8s.io/docs/user-guide/setup/install/ krew.sigs.k8s.io https://krew.sigs.k8s.io/docs/user-guide/setup/install/
static
KubectlPluginList(ICakeContext, KubectlPluginListSettings) void
List all available plugin files on a user's PATH. Available plugin files are those that are: - executable - anywhere on the user's PATH - begin with "kubectl-"
static
KubectlPluginListWithResult(ICakeContext, KubectlPluginListSettings) IEnumerable<string>
List all available plugin files on a user's PATH. Available plugin files are those that are: - executable - anywhere on the user's PATH - begin with "kubectl-"
static
KubectlPluginWithResult(ICakeContext, KubectlPluginSettings) IEnumerable<string>
Provides utilities for interacting with plugins. Plugins provide extended functionality that is not part of the major command-line distribution. Please refer to the documentation and examples for more information about how write your own plugins. The easiest way to discover and install plugins is via the kubernetes sub-project krew. To install krew, visit https://krew.sigs.k8s.io/docs/user-guide/setup/install/ krew.sigs.k8s.io https://krew.sigs.k8s.io/docs/user-guide/setup/install/
static
KubectlPortForward(ICakeContext, KubectlPortForwardSettings) void
Forward one or more local ports to a pod. Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted. If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun of the command is needed to resume forwarding.
static
KubectlPortForwardWithResult(ICakeContext, KubectlPortForwardSettings) IEnumerable<string>
Forward one or more local ports to a pod. Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted. If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun of the command is needed to resume forwarding.
static
KubectlProxy(ICakeContext, KubectlProxySettings) void
Creates a proxy server or application-level gateway between localhost and the Kubernetes API server. It also allows serving static content over specified HTTP path. All incoming data enters through one port and gets forwarded to the remote Kubernetes API server port, except for the path matching the static content path.
static
KubectlProxyWithResult(ICakeContext, KubectlProxySettings) IEnumerable<string>
Creates a proxy server or application-level gateway between localhost and the Kubernetes API server. It also allows serving static content over specified HTTP path. All incoming data enters through one port and gets forwarded to the remote Kubernetes API server port, except for the path matching the static content path.
static
KubectlReplace(ICakeContext, KubectlReplaceSettings) void
Replace a resource by file name or stdin. JSON and YAML formats are accepted. If replacing an existing resource, the complete resource spec must be provided. This can be obtained by $ kubectl get TYPE NAME -o yaml
static
KubectlReplaceWithResult(ICakeContext, KubectlReplaceSettings) IEnumerable<string>
Replace a resource by file name or stdin. JSON and YAML formats are accepted. If replacing an existing resource, the complete resource spec must be provided. This can be obtained by $ kubectl get TYPE NAME -o yaml
static
KubectlRollout(ICakeContext, KubectlRolloutSettings) void
Manage the rollout of one or many resources. Valid resource types include: * deployments * daemonsets * statefulsets
static
KubectlRolloutHistory(ICakeContext, KubectlRolloutHistorySettings) void
View previous rollout revisions and configurations.
static
KubectlRolloutHistoryWithResult(ICakeContext, KubectlRolloutHistorySettings) IEnumerable<string>
View previous rollout revisions and configurations.
static
KubectlRolloutPause(ICakeContext, KubectlRolloutPauseSettings) void
Mark the provided resource as paused. Paused resources will not be reconciled by a controller. Use "kubectl rollout resume" to resume a paused resource. Currently only deployments support being paused.
static
KubectlRolloutPauseWithResult(ICakeContext, KubectlRolloutPauseSettings) IEnumerable<string>
Mark the provided resource as paused. Paused resources will not be reconciled by a controller. Use "kubectl rollout resume" to resume a paused resource. Currently only deployments support being paused.
static
KubectlRolloutRestart(ICakeContext, KubectlRolloutRestartSettings) void
Restart a resource. Resource rollout will be restarted.
static
KubectlRolloutRestartWithResult(ICakeContext, KubectlRolloutRestartSettings) IEnumerable<string>
Restart a resource. Resource rollout will be restarted.
static
KubectlRolloutResume(ICakeContext, KubectlRolloutResumeSettings) void
Resume a paused resource. Paused resources will not be reconciled by a controller. By resuming a resource, we allow it to be reconciled again. Currently only deployments support being resumed.
static
KubectlRolloutResumeWithResult(ICakeContext, KubectlRolloutResumeSettings) IEnumerable<string>
Resume a paused resource. Paused resources will not be reconciled by a controller. By resuming a resource, we allow it to be reconciled again. Currently only deployments support being resumed.
static
KubectlRolloutStatus(ICakeContext, KubectlRolloutStatusSettings) void
Show the status of the rollout. By default 'rollout status' will watch the status of the latest rollout until it's done. If you don't want to wait for the rollout to finish then you can use --watch=false. Note that if a new rollout starts in-between, then 'rollout status' will continue watching the latest revision. If you want to pin to a specific revision and abort if it is rolled over by another revision, use --revision=N where N is the revision you need to watch for.
static
KubectlRolloutStatusWithResult(ICakeContext, KubectlRolloutStatusSettings) IEnumerable<string>
Show the status of the rollout. By default 'rollout status' will watch the status of the latest rollout until it's done. If you don't want to wait for the rollout to finish then you can use --watch=false. Note that if a new rollout starts in-between, then 'rollout status' will continue watching the latest revision. If you want to pin to a specific revision and abort if it is rolled over by another revision, use --revision=N where N is the revision you need to watch for.
static
KubectlRolloutUndo(ICakeContext, KubectlRolloutUndoSettings) void
Roll back to a previous rollout.
static
KubectlRolloutUndoWithResult(ICakeContext, KubectlRolloutUndoSettings) IEnumerable<string>
Roll back to a previous rollout.
static
KubectlRolloutWithResult(ICakeContext, KubectlRolloutSettings) IEnumerable<string>
Manage the rollout of one or many resources. Valid resource types include: * deployments * daemonsets * statefulsets
static
KubectlRun(ICakeContext, KubectlRunSettings) void
Create and run a particular image in a pod.
static
KubectlRunWithResult(ICakeContext, KubectlRunSettings) IEnumerable<string>
Create and run a particular image in a pod.
static
KubectlScale(ICakeContext, KubectlScaleSettings) void
Set a new size for a deployment, replica set, replication controller, or stateful set. Scale also allows users to specify one or more preconditions for the scale action. If --current-replicas or --resource-version is specified, it is validated before the scale is attempted, and it is guaranteed that the precondition holds true when the scale is sent to the server.
static
KubectlScaleWithResult(ICakeContext, KubectlScaleSettings) IEnumerable<string>
Set a new size for a deployment, replica set, replication controller, or stateful set. Scale also allows users to specify one or more preconditions for the scale action. If --current-replicas or --resource-version is specified, it is validated before the scale is attempted, and it is guaranteed that the precondition holds true when the scale is sent to the server.
static
KubectlSet(ICakeContext, KubectlSetSettings) void
Configure application resources. These commands help you make changes to existing application resources.
static
KubectlSetEnv(ICakeContext, KubectlSetEnvSettings) void
Update environment variables on a pod template. List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable definitions on all containers in the specified pods or pod templates, or just those that match a wildcard. If "--env -" is passed, environment variables can be read from STDIN using the standard env syntax. Possible resources include (case insensitive): pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs)
static
KubectlSetEnvWithResult(ICakeContext, KubectlSetEnvSettings) IEnumerable<string>
Update environment variables on a pod template. List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable definitions on all containers in the specified pods or pod templates, or just those that match a wildcard. If "--env -" is passed, environment variables can be read from STDIN using the standard env syntax. Possible resources include (case insensitive): pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs)
static
KubectlSetImage(ICakeContext, KubectlSetImageSettings) void
Update existing container image(s) of resources. Possible resources include (case insensitive): pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs)
static
KubectlSetImageWithResult(ICakeContext, KubectlSetImageSettings) IEnumerable<string>
Update existing container image(s) of resources. Possible resources include (case insensitive): pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs)
static
KubectlSetResources(ICakeContext, KubectlSetResourcesSettings) void
Specify compute resource requirements (CPU, memory) for any resource that defines a pod template. If a pod is successfully scheduled, it is guaranteed the amount of resource requested, but may burst up to its specified limits. For each compute resource, if a limit is specified and a request is omitted, the request will default to the limit. Possible resources include (case insensitive): Use "kubectl api-resources" for a complete list of supported resources..
static
KubectlSetResourcesWithResult(ICakeContext, KubectlSetResourcesSettings) IEnumerable<string>
Specify compute resource requirements (CPU, memory) for any resource that defines a pod template. If a pod is successfully scheduled, it is guaranteed the amount of resource requested, but may burst up to its specified limits. For each compute resource, if a limit is specified and a request is omitted, the request will default to the limit. Possible resources include (case insensitive): Use "kubectl api-resources" for a complete list of supported resources..
static
KubectlSetSelector(ICakeContext, KubectlSetSelectorSettings) void
Set the selector on a resource. Note that the new selector will overwrite the old selector if the resource had one prior to the invocation of 'set selector'. A selector must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters. If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used. Note: currently selectors can only be set on Service objects.
static
KubectlSetSelectorWithResult(ICakeContext, KubectlSetSelectorSettings) IEnumerable<string>
Set the selector on a resource. Note that the new selector will overwrite the old selector if the resource had one prior to the invocation of 'set selector'. A selector must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters. If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used. Note: currently selectors can only be set on Service objects.
static
KubectlSetServiceaccount(ICakeContext, KubectlSetServiceaccountSettings) void
Update the service account of pod template resources. Possible resources (case insensitive) can be: replicationcontroller (rc), deployment (deploy), daemonset (ds), job, replicaset (rs), statefulset
static
KubectlSetServiceaccountWithResult(ICakeContext, KubectlSetServiceaccountSettings) IEnumerable<string>
Update the service account of pod template resources. Possible resources (case insensitive) can be: replicationcontroller (rc), deployment (deploy), daemonset (ds), job, replicaset (rs), statefulset
static
KubectlSetSubject(ICakeContext, KubectlSetSubjectSettings) void
Update the user, group, or service account in a role binding or cluster role binding.
static
KubectlSetSubjectWithResult(ICakeContext, KubectlSetSubjectSettings) IEnumerable<string>
Update the user, group, or service account in a role binding or cluster role binding.
static
KubectlSetWithResult(ICakeContext, KubectlSetSettings) IEnumerable<string>
Configure application resources. These commands help you make changes to existing application resources.
static
KubectlTaint(ICakeContext, KubectlTaintSettings) void
Update the taints on one or more nodes. * A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect. * The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 253 characters. * Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app. * The value is optional. If given, it must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters. * The effect must be NoSchedule, PreferNoSchedule or NoExecute. * Currently taint can only apply to node.
static
KubectlTaintWithResult(ICakeContext, KubectlTaintSettings) IEnumerable<string>
Update the taints on one or more nodes. * A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect. * The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 253 characters. * Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app. * The value is optional. If given, it must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters. * The effect must be NoSchedule, PreferNoSchedule or NoExecute. * Currently taint can only apply to node.
static
KubectlTop(ICakeContext, KubectlTopSettings) void
Display Resource (CPU/Memory) usage. The top command allows you to see the resource consumption for nodes or pods. This command requires Metrics Server to be correctly configured and working on the server.
static
KubectlTopNode(ICakeContext, KubectlTopNodeSettings) void
Display resource (CPU/memory) usage of nodes. The top-node command allows you to see the resource consumption of nodes.
static
KubectlTopNodeWithResult(ICakeContext, KubectlTopNodeSettings) IEnumerable<string>
Display resource (CPU/memory) usage of nodes. The top-node command allows you to see the resource consumption of nodes.
static
KubectlTopPod(ICakeContext, KubectlTopPodSettings) void
Display resource (CPU/memory) usage of pods. The 'top pod' command allows you to see the resource consumption of pods. Due to the metrics pipeline delay, they may be unavailable for a few minutes since pod creation.
static
KubectlTopPodWithResult(ICakeContext, KubectlTopPodSettings) IEnumerable<string>
Display resource (CPU/memory) usage of pods. The 'top pod' command allows you to see the resource consumption of pods. Due to the metrics pipeline delay, they may be unavailable for a few minutes since pod creation.
static
KubectlTopWithResult(ICakeContext, KubectlTopSettings) IEnumerable<string>
Display Resource (CPU/Memory) usage. The top command allows you to see the resource consumption for nodes or pods. This command requires Metrics Server to be correctly configured and working on the server.
static
KubectlUncordon(ICakeContext, KubectlUncordonSettings) void
Mark node as schedulable.
static
KubectlUncordonWithResult(ICakeContext, KubectlUncordonSettings) IEnumerable<string>
Mark node as schedulable.
static
KubectlVersion(ICakeContext, KubectlVersionSettings) void
Print the client and server version information for the current context.
static
KubectlVersionWithResult(ICakeContext, KubectlVersionSettings) IEnumerable<string>
Print the client and server version information for the current context.
static
KubectlWait(ICakeContext, KubectlWaitSettings) void
Experimental: Wait for a specific condition on one or many resources. The command takes multiple resources and waits until the specified condition is seen in the Status field of every given resource. Alternatively, the command can wait for the given set of resources to be deleted by providing the "delete" keyword as the value to the --for flag. A successful message will be printed to stdout indicating when the specified condition has been met. You can use -o option to change to output destination.
static
KubectlWaitWithResult(ICakeContext, KubectlWaitSettings) IEnumerable<string>
Experimental: Wait for a specific condition on one or many resources. The command takes multiple resources and waits until the specified condition is seen in the Status field of every given resource. Alternatively, the command can wait for the given set of resources to be deleted by providing the "delete" keyword as the value to the --for flag. A successful message will be printed to stdout indicating when the specified condition has been met. You can use -o option to change to output destination.
static

Extension Methods

Name Value Summary
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin