For typical CI/CD tasks that don't require Docker daemon access, use the agent.yml
pod sepc.
For CI/CD jobs that need Docker daemon to build Docker images, use the privileged-agent.yml
pod spec.
Make sure you are running TeamCity server version >= 2020.1 or have the Kubernetes support plugin installed.
Create a new cloud profile in your cloud profiles settings.
For the agent image configuration popup, choose "Use custom pod template", then fill in content of the YAML file below that matches your need.
You might want to create two Agent pool and two Cloud Profiles, for privileged and unprivileged agents respectively.
Is there any way to autoscale it and authorize the agent automatically ?