Kubernetes Executor
The default "agentless" Kubernetes integration that allows TeamCity to offload all building tasks to a K8S cluster.
Example. Adds new Kubernetes executor that allows TeamCity to offload builds to Kubernetes
project {
// Other Project settings ...
features {
// Other Project Features ...
kubernetesExecutor {
id = "PROJECT_EXT_32"
connectionId = "PROJECT_EXT_14"
profileName = "executor"
templateName = "executors-template"
}
Content copied to clipboard }
}
Example. Adds new Kubernetes executor that allows TeamCity to offload builds to Kubernetes. This executor is aware of the parameters available to the executor build.
project {
// Other Project settings ...
features {
// Other Project Features ...
kubernetesExecutor {
id = "PROJECT_EXT_32"
connectionId = "PROJECT_EXT_14"
profileName = "executor"
containerParameters = "requirement1=value1"
}
Content copied to clipboard }
}
See also
Properties
Maximum number of allowed builds running with the executor
The Kubernetes connection to use
Specify parameters in the “name=value” format to be matched against explicit agent requirements of build configurations. Pods without this setting will be compatible only with configurations that impose no explicit requirements. Format: parameter1=value1,parameter2=value2"
A small description of the current profile
Display name of the profile
A template of a pod with a single container with the settings to be applied to the build
The template's name with a pod with a single container with the settings to be applied to the build. The template must be available in the cluster of the selected connection.
Functions
Copies parameters of this object to the specified target
Creates an instance of this project feature via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.
Validates this object and reports found errors to the provided consumer