KubectlAliases.

KubectlExpose(ICakeContext, KubectlExposeSettings) Method

Summary

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)
Assembly
Cake.Kubectl.dll
Namespace
Cake.Kubectl
Containing Type
KubectlAliases

Syntax

public static void KubectlExpose(this ICakeContext context, KubectlExposeSettings settings)

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The context.
settings KubectlExposeSettings The settings.

Return Value

Type Description
void