Setting Up TeamCity for Kubernetes
TeamCity integration with Kubernetes does not depend on the
kubectl tool and thus does not require installing it in a cluster.
Make sure the TeamCity user is allowed to perform writing operations in the Kubernetes namespace specified in the cloud profile settings.
Kubernetes Cloud Profile Configuration
For general cloud profile options, refer to the Agent Cloud Profile page.
To configure options available for the Kubernetes cloud type, refer to the table below:
Kubernetes API server URL
Specify the URL of the API server.
Certificate Authority (CA)
Enter the content of the CA certificate for your cluster.
Select the required authentication strategy.
Depending on the selected strategy, the set of extra options will vary. Refer to the Kubernetes documentation for details on available options.
Adding Kubernetes Cloud Image
To run a build agent in Kubernetes, TeamCity needs to create a separate pod in your cluster.
When adding an image to the Kubernetes cloud profile, you can choose one of the three pod specification types:
Use pod template from deployment
Run a new pod based on a deployment created in your cluster.
Run single container
Run a single container based on any given agent Docker image.
Use custom pod template
Enter your own pod template in a YAML format. This option is recommended for accessing images located in private repositories: you can specify authentication parameters inside the template code.