|
2 | 2 |
|
3 | 3 | ### Configure Cluster Profile
|
4 | 4 |
|
5 |
| -1. Login to `GoCD server` as admin and navigate to **_Admin_** _>_ **_Elastic Agent Configurations_** |
6 |
| -2. Click on **_Add_** button and select `Kubernetes Elastic Agent Plugin` from the plugin ID dropdown. |
7 |
| - 1. Specify `Cluster Profile Name` for the new cluster |
8 |
| - 1. Optionally specify `Go Server URL`, if GoCD secure site URL is not configured. |
9 |
| - 2. Optionally Specify `Agent auto-register timeout (in minutes)`, Defaults to `10` (mintues). |
10 |
| - 3. Optionally Specify `Maximum pending pods`, Defaults to `10` (pods). |
11 |
| - 4. Specify `Cluster URL`. |
12 |
| - 5. Optionally Specify `Namespace`, Defaults to `default`. Note: If you have multiple GoCD servers with cluster profiles pointing to the same Kubernetes cluster, make sure that the namespace is different. Otherwise, the plugin of one GoCD server will end up terminating pods started by the plugin in the other GoCD servers. |
13 |
| - 6. Specify `Security token`, The token must have permission to perform the following operations - |
14 |
| - ``` |
15 |
| - - nodes: list, get |
16 |
| - - events: list, watch |
17 |
| - - namespace: list, get |
18 |
| - - pods, pods/log: * |
19 |
| - ``` |
20 |
| - 7. Optionally, Specify `Cluster CA certificate data`. |
21 |
| - |
22 |
| - !["Kubernetes Cluster Profile"][1] |
23 |
| - |
| 5 | +1. Log in to the GoCD server as admin and navigate to **_Admin_** _>_ **_Elastic Agent Configurations_**. |
| 6 | + |
| 7 | +1. Click on the **_Add_** button and select `Kubernetes Elastic Agent Plugin` from the plugin ID dropdown. |
| 8 | + |
| 9 | +1. Specify `Cluster Profile Name` for the new cluster. |
| 10 | + |
| 11 | +1. Optionally specify `Go Server URL`. If your GoCD server has a [secure site URL][secure site URL] |
| 12 | + configured, then the secure site URL is used as a default. Otherwise, a URL must be specified here. |
| 13 | + |
| 14 | +1. Optionally specify `Agent auto-register timeout (in minutes)`. This defaults to 10 (minutes) if not provided. |
| 15 | + |
| 16 | +1. Optionally Specify `Maximum pending pods`. This defaults to 10 (pods) if not provided. |
| 17 | + |
| 18 | +1. Specify `Cluster URL`. |
| 19 | + |
| 20 | +1. Optionally specify `Namespace`. If not provided, the plugin will launch GoCD |
| 21 | + agent pods in the default Kubernetes namespace. Note: If you have multiple |
| 22 | + GoCD servers with cluster profiles pointing to the same Kubernetes cluster, |
| 23 | + make sure that the namespace used by each GoCD server is different. |
| 24 | + Otherwise, the plugin of one GoCD server will end up terminating pods |
| 25 | + started by the plugin in the other GoCD servers. |
| 26 | + |
| 27 | +1. Specify `Security token`. This should be a Kubernetes API token with the |
| 28 | + following permissions: |
| 29 | + |
| 30 | + | Resource | Actions | |
| 31 | + | -------------- | ----------- | |
| 32 | + | nodes | list | |
| 33 | + | events | list | |
| 34 | + | pods, pods/log | * | |
| 35 | + |
| 36 | + If the plugin is using a non-default namespace, then the pods and pods/log permissions |
| 37 | + can be limited to that namespace (using a role + role binding), and the plugin |
| 38 | + will still work. Nodes list and events list need to be attached at the cluster |
| 39 | + level (using a cluster role + cluster role binding) regardless of the |
| 40 | + namespace chosen. |
| 41 | + |
| 42 | +1. Optionally specify `Cluster CA certificate data`. This should be the base-64-encoded certificate |
| 43 | + of the Kubernetes API server. It can be omitted in the rare case that the Kubernetes API |
| 44 | + is configured to serve plain HTTP. |
| 45 | + |
| 46 | +!["Kubernetes Cluster Profile"][1] |
| 47 | + |
24 | 48 |
|
25 | 49 | [1]: images/cluster-profile.png "Kubernetes Cluster Profile"
|
| 50 | +[secure site URL]: https://docs.gocd.org/current/installation/configuring_server_details.html |
0 commit comments