Skip to content

Commit 37121b4

Browse files
authored
Merge pull request #1593 from rundeck/k8s-cluster-plugins
RPL-77: GKE, AKS, EKS node sources and node steps plugins
2 parents 42ff5bc + 43f931e commit 37121b4

File tree

12 files changed

+467
-0
lines changed

12 files changed

+467
-0
lines changed

docs/.vuepress/sidebar-menus/user-guide.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ export default [{
3232
children: [
3333
'/manual/projects/resource-model-sources/',
3434
'/manual/projects/resource-model-sources/aws',
35+
'/manual/projects/resource-model-sources/aws-eks',
3536
'/manual/projects/resource-model-sources/azure',
37+
'/manual/projects/resource-model-sources/azure-aks',
3638
'/manual/projects/resource-model-sources/datadog',
3739
{text:'Docker', link:'/manual/projects/resource-model-sources/docker'},
3840
'/manual/projects/resource-model-sources/ecs-fargate',
3941
'/manual/projects/resource-model-sources/gcp',
42+
'/manual/projects/resource-model-sources/gcp-gke',
4043
'/manual/projects/resource-model-sources/kubernetes',
4144
'/manual/projects/resource-model-sources/builtin',
4245
'/manual/projects/resource-model-sources/oracle',
@@ -104,6 +107,14 @@ export default [{
104107
{text: 'Kubernetes Pod', link: '/manual/jobs/job-plugins/node-steps/kubernetes-pod-plugins', icon: '/assets/img/kubernetes-icon.png'},
105108
{text: 'Kubernetes Service', link: '/manual/jobs/job-plugins/node-steps/kubernetes-service-plugins', icon: '/assets/img/kubernetes-icon.png'},
106109
{text: 'Kubernetes StatefulSet', link: '/manual/jobs/job-plugins/node-steps/kubernetes-statefulset-plugins', icon: '/assets/img/kubernetes-icon.png'},
110+
{text: 'Kubernetes Cluster Create Object', link: '/manual/jobs/job-plugins/node-steps/kubernetes-create-object', icon: '/assets/img/kubernetes-icon.png'},
111+
{text: 'Kubernetes Cluster Delete Object', link: '/manual/jobs/job-plugins/node-steps/kubernetes-delete-object', icon: '/assets/img/kubernetes-icon.png'},
112+
{text: 'Kubernetes Cluster Describe Object', link: '/manual/jobs/job-plugins/node-steps/kubernetes-describe-object', icon: '/assets/img/kubernetes-icon.png'},
113+
{text: 'Kubernetes Cluster List Objects', link: '/manual/jobs/job-plugins/node-steps/kubernetes-list-objects', icon: '/assets/img/kubernetes-icon.png'},
114+
{text: 'Kubernetes Cluster Object Logs', link: '/manual/jobs/job-plugins/node-steps/kubernetes-object-logs', icon: '/assets/img/kubernetes-icon.png'},
115+
{text: 'Kubernetes Cluster Run Command', link: '/manual/jobs/job-plugins/node-steps/kubernetes-run-command', icon: '/assets/img/kubernetes-icon.png'},
116+
{text: 'Kubernetes Cluster Run Script', link: '/manual/jobs/job-plugins/node-steps/kubernetes-run-script', icon: '/assets/img/kubernetes-icon.png'},
117+
{text: 'Kubernetes Cluster Update Object', link: '/manual/jobs/job-plugins/node-steps/kubernetes-update-object', icon: '/assets/img/kubernetes-icon.png'},
107118
{text: 'Jira', link: '/manual/jobs/job-plugins/node-steps/jira', icon: '/assets/img/jira-icon.svg'},
108119
{text: 'Local Command Step', link: '/manual/jobs/job-plugins/node-steps/builtin.md#local-command-step', icon: '/assets/img/command-icon.png'},
109120
{text: 'Loop Script', link: '/manual/jobs/job-plugins/node-steps/loop-plugins',icon: '/assets/img/pd-icon.png'},
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Kubernetes Clusters - Create Object
2+
:::enterprise
3+
:::
4+
5+
## Overview
6+
7+
This plugin creates an object of a selected kind within a Kubernetes cluster. It is designed to work in conjunction with the AWS EKS, GCP GKE, and Azure AKS [Resource Model Source plugins](/manual/projects/resource-model-sources/).
8+
9+
## Configuration
10+
11+
### Required Fields
12+
13+
* **YAML Definition**: The YAML definition of the object to be created.
14+
* **Namespace**: The namespace where the object will be created. Default is `default`.
15+
16+
### Optional Fields
17+
18+
* **Object Type**: Select the type of object to create (e.g., Pods, ConfigMaps, Deployments). Default is "Pods".
19+
* **Output Format**: Choose the format for the output (JSON or YAML). Default is JSON.
20+
21+
## Usage
22+
23+
1. Select the desired object type from the dropdown menu.
24+
2. Provide the YAML definition for the object you want to create.
25+
3. Specify the namespace where the object should be created.
26+
4. Choose the preferred output format.
27+
28+
## Authentication
29+
30+
Kubernetes Clusters plugins operate on a per-cluster basis and authenticate in one of two ways, as configured in the [Resource Model Plugin](/manual/projects/resource-model-sources/) used to fetch the nodes. This configuration is controlled by the `Use Pod Service Account for Node Steps` option:
31+
32+
1. When disabled, the plugin uses the cloud provider credentials set in the resource model to retrieve the
33+
kube-config for the targeted cluster.
34+
35+
2. When enabled, the [Enterprise Runner](/administration/runner/) must be placed in the cluster and uses its pod's K8s service account for authentication.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Kubernetes Clusters - Delete Object
2+
:::enterprise
3+
:::
4+
5+
## Overview
6+
7+
This plugin creates an object of a selected kind within a Kubernetes cluster. It is designed to work in conjunction with the AWS EKS, GCP GKE, and Azure AKS [Resource Model Source plugins](/manual/projects/resource-model-sources/).
8+
9+
10+
## Configuration
11+
12+
### Required Fields
13+
14+
* **Name**: The name of the object to be deleted, such as Pod name or Deployment name.
15+
* **Namespace**: The namespace where the object resides. Default is `default`.
16+
17+
### Optional Fields
18+
19+
* **Object Type**: Select the type of object to delete (e.g., Pods, ConfigMaps, Deployments). Default is "Pods".
20+
* **Output Format**: Choose the format for the output (JSON or YAML). Default is JSON.
21+
22+
## Usage
23+
24+
1. Select the desired object type from the dropdown menu.
25+
2. Provide the name of the object you want to delete.
26+
3. Specify the namespace where the object is located.
27+
4. Choose the preferred output format.
28+
29+
## Authentication
30+
31+
Kubernetes Clusters plugins operate on a per-cluster basis and authenticate in one of two ways, as configured in the [Resource Model Plugin](/manual/projects/resource-model-sources/) used to fetch the nodes. This configuration is controlled by the `Use Pod Service Account for Node Steps` option:
32+
33+
1. When disabled, the plugin uses the cloud provider credentials set in the resource model to retrieve the
34+
kube-config for the targeted cluster.
35+
36+
2. When enabled, the [Enterprise Runner](/administration/runner/) must be placed in the cluster and uses its pod's K8s service account for authentication.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Kubernetes Clusters - Describe Object
2+
:::enterprise
3+
:::
4+
5+
## Overview
6+
7+
This plugin describes an object of a selected kind within a Kubernetes cluster. It is designed to work in conjunction with the AWS EKS, GCP GKE, and Azure AKS [Resource Model Source plugins](/manual/projects/resource-model-sources/).
8+
## Configuration
9+
10+
### Required Fields
11+
12+
* **Name**: The name of the object to be described, such as Pod name or Deployment name.
13+
* **Namespace**: The namespace where the object resides. Default is `default`.
14+
15+
### Optional Fields
16+
17+
* **Object Type**: Select the type of object to describe (e.g., Pods, ConfigMaps, Deployments). Default is "Pods".
18+
* **Output Format**: Choose the format for the output (JSON or YAML). Default is JSON.
19+
20+
## Usage
21+
22+
1. Select the desired object type from the dropdown menu.
23+
2. Provide the name of the object you want to describe.
24+
3. Specify the namespace where the object is located.
25+
4. Choose the preferred output format.
26+
27+
## Authentication
28+
29+
Kubernetes Clusters plugins operate on a per-cluster basis and authenticate in one of two ways, as configured in the [Resource Model Plugin](/manual/projects/resource-model-sources/) used to fetch the nodes. This configuration is controlled by the `Use Pod Service Account for Node Steps` option:
30+
31+
1. When disabled, the plugin uses the cloud provider credentials set in the resource model to retrieve the
32+
kube-config for the targeted cluster.
33+
34+
2. When enabled, the [Enterprise Runner](/administration/runner/) must be placed in the cluster and uses its pod's K8s service account for authentication.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Kubernetes Clusters - List Objects
2+
:::enterprise
3+
:::
4+
5+
## Overview
6+
7+
This plugin creates an object of a selected kind within a Kubernetes cluster. It is designed to work in conjunction with the AWS EKS, GCP GKE, and Azure AKS [Resource Model Source plugins](/manual/projects/resource-model-sources/).
8+
9+
## Configuration
10+
11+
### Required Fields
12+
13+
* **Namespace**: The namespace to list objects from. Default is `default`.
14+
15+
### Optional Fields
16+
17+
* **Object Type**: Select the type of object to list (e.g., Pods, ConfigMaps, Deployments). Default is "Pods".
18+
* **All Namespaces**: If selected, retrieve objects from across all namespaces. The 'Namespace' field will be ignored.
19+
* **Label Selector**: Filter objects based on labels. Supports equality-based and set-based selectors.
20+
* **Field Selector**: Filter objects based on fields. Supports equality-based and set-based selectors.
21+
* **Output Format**: Choose the format for the output (Simple List, JSON, or YAML). Default is "Simple List".
22+
23+
## Usage
24+
25+
1. Select the desired object type from the dropdown menu.
26+
2. Specify the namespace or choose to list from all namespaces.
27+
3. Optionally, add label or field selectors to filter the results.
28+
4. Choose the preferred output format.
29+
30+
## Authentication
31+
32+
Kubernetes Clusters plugins operate on a per-cluster basis and authenticate in one of two ways, as configured in the [Resource Model Plugin](/manual/projects/resource-model-sources/) used to fetch the nodes. This configuration is controlled by the `Use Pod Service Account for Node Steps` option:
33+
34+
1. When disabled, the plugin uses the cloud provider credentials set in the resource model to retrieve the
35+
kube-config for the targeted cluster.
36+
37+
2. When enabled, the [Enterprise Runner](/administration/runner/) must be placed in the cluster and uses its pod's K8s service account for authentication.
38+
39+
## Notes
40+
41+
- For detailed information on label selectors, refer to the [Kubernetes documentation on label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors).
42+
- For detailed information on field selectors, refer to the [Kubernetes documentation on field selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/).
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Kubernetes Clusters - Object Logs
2+
:::enterprise
3+
:::
4+
5+
## Overview
6+
7+
This plugin allows you to view the logs of an object within a Kubernetes cluster. It is designed to work in conjunction with the AWS EKS, GCP GKE, and Azure AKS [Resource Model Source plugins](/manual/projects/resource-model-sources/)
8+
9+
## Configuration
10+
11+
### Required Fields
12+
13+
* **Name**: The name of the object to view logs from, such as Pod name or Deployment name.
14+
* **Namespace**: The namespace where the object resides. Default is `default`.
15+
16+
### Optional Fields
17+
18+
* **Container**: Specify a particular container to view logs from within the object.
19+
* **Number of Log Lines**: The number of log lines to retrieve. Default is 50.
20+
* **Time-span (seconds)**: A relative time in seconds before the current time from which to show logs.
21+
* **Follow Logs**: If selected, the plugin will follow the log output. Note that the Job may continue to run until manually stopped.
22+
23+
## Usage
24+
25+
1. Provide the name of the object you want to view logs from.
26+
2. Specify the namespace where the object is located.
27+
3. Optionally, specify a particular container, number of log lines, time-span, or choose to follow logs.
28+
29+
## Authentication
30+
31+
Kubernetes Clusters plugins operate on a per-cluster basis and authenticate in one of two ways, as configured in the [Resource Model Plugin](/manual/projects/resource-model-sources/) used to fetch the nodes. This configuration is controlled by the `Use Pod Service Account for Node Steps` option:
32+
33+
1. When disabled, the plugin uses the cloud provider credentials set in the resource model to retrieve the
34+
kube-config for the targeted cluster.
35+
36+
2. When enabled, the [Enterprise Runner](/administration/runner/) must be placed in the cluster and uses its pod's K8s service account for authentication.
37+
38+
## Notes
39+
40+
- When using the "Follow Logs" option, be aware that the Job will continue running until it's manually stopped.
41+
- The Time-span option allows you to view logs from a specific point in time, which can be useful for troubleshooting recent issues.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Kubernetes Clusters - Run Command
2+
:::enterprise
3+
:::
4+
5+
## Overview
6+
7+
This plugin allows you to execute a command in a pod within a Kubernetes cluster. It is designed to work in conjunction with the AWS EKS, GCP GKE, and Azure AKS [Resource Model Source plugins](/manual/projects/resource-model-sources/).
8+
## Configuration
9+
10+
### Required Fields
11+
12+
* **Pod Name**: The name of the pod to execute the command in.
13+
* **Namespace**: The namespace where the pod resides. Default is `default`.
14+
* **Command**: The command to execute in the pod.
15+
16+
### Optional Fields
17+
18+
* **Container**: Specify a particular container within the pod to execute the command in.
19+
* **Shell**: Specific shell to use for executing the command in the container. Default is `/bin/sh`.
20+
21+
## Usage
22+
23+
1. Provide the name of the pod you want to execute the command in.
24+
2. Specify the namespace where the pod is located.
25+
3. Enter the command you want to execute.
26+
4. Optionally, specify a particular container and/or shell to use.
27+
28+
## Authentication
29+
30+
Kubernetes Clusters plugins operate on a per-cluster basis and authenticate in one of two ways, as configured in the [Resource Model Plugin](/manual/projects/resource-model-sources/) used to fetch the nodes. This configuration is controlled by the `Use Pod Service Account for Node Steps` option:
31+
32+
1. When disabled, the plugin uses the cloud provider credentials set in the resource model to retrieve the
33+
kube-config for the targeted cluster.
34+
35+
2. When enabled, the [Enterprise Runner](/administration/runner/) must be placed in the cluster and uses its pod's K8s service account for authentication.
36+
37+
## Notes
38+
39+
- Make sure the command you're executing is available in the specified container.
40+
- If no specific container is specified, the command will be executed in the first container of the pod.
41+
- The shell option allows you to choose a different shell if the default `/bin/sh` is not available or if you need to use a different shell for specific commands.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Kubernetes Clusters - Run Script
2+
:::enterprise
3+
:::
4+
5+
## Overview
6+
7+
This plugin executes a script using a predefined container image within a Kubernetes cluster. It deploys a Kubernetes Job to run the script in a container, then deletes the Job after execution. This plugin is designed to work in conjunction with the AWS EKS, GCP GKE, and Azure AKS [Resource Model Source plugins](/manual/projects/resource-model-sources/).
8+
9+
## Configuration
10+
11+
### Required Fields
12+
13+
* **Script**: The script to execute in the container.
14+
* **Invocation Command**: The command to execute the script in the container. Default is `sh -c`.
15+
* **Container Image**: The container image to use for script execution. Default is `amazon/aws-cli`.
16+
* **Namespace**: The namespace where the Kubernetes Job will be deployed. Default is `default`.
17+
18+
### Optional Fields
19+
20+
* **Environment Variables**: Environment variables to pass to the container (YAML syntax).
21+
* **Image Pull Policy**: The image pull policy for the container. Options are "Always", "IfNotPresent", or "Never". Default is "Always".
22+
23+
## Usage
24+
25+
1. Enter the script you want to execute.
26+
2. Specify the invocation command (if different from default).
27+
3. Choose the container image to use.
28+
4. Specify the namespace for the Job deployment.
29+
5. Optionally, add environment variables and set the image pull policy.
30+
31+
## Authentication
32+
33+
Kubernetes Clusters plugins operate on a per-cluster basis and authenticate in one of two ways, as configured in the [Resource Model Plugin](/manual/projects/resource-model-sources/) used to fetch the nodes. This configuration is controlled by the `Use Pod Service Account for Node Steps` option:
34+
35+
1. When disabled, the plugin uses the cloud provider credentials set in the resource model to retrieve the
36+
kube-config for the targeted cluster.
37+
38+
2. When enabled, the [Enterprise Runner](/administration/runner/) must be placed in the cluster and uses its pod's K8s service account for authentication.
39+
40+
## Notes
41+
42+
- The Job is automatically deleted after script execution.
43+
- Environment variables support the 'valueFrom' field for referencing secrets and other sources. See [Kubernetes Docs](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) for detailed syntax and examples.
44+
- Predefined container images include options like `amazon/aws-cli`, `bitnami/kubectl`, `mcr.microsoft.com/azure-cli`, `google/cloud-sdk`, and `dtzar/helm-kubectl`, but custom images can also be specified.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Kubernetes Clusters - Update Object
2+
:::enterprise
3+
:::
4+
5+
## Overview
6+
7+
This plugin updates a specified object of a selected kind within a Kubernetes cluster. It is designed to work in conjunction with the AWS EKS, GCP GKE, and Azure AKS [Resource Model Source plugins](/manual/projects/resource-model-sources/).
8+
9+
## Configuration
10+
11+
### Required Fields
12+
13+
* **Object Name**: The name of the object to be updated.
14+
* **YAML Definition**: The YAML definition of the object to be updated.
15+
* **Namespace**: The namespace where the object resides. Default is `default`.
16+
17+
### Optional Fields
18+
19+
* **Object Type**: Select the type of object to update (e.g., Pods, Deployments, Services). Default is "Pods".
20+
21+
## Usage
22+
23+
1. Provide the name of the object you want to update.
24+
2. Select the desired object type from the dropdown menu.
25+
3. Enter the updated YAML definition for the object.
26+
4. Specify the namespace where the object is located.
27+
28+
## Authentication
29+
30+
Kubernetes Clusters plugins operate on a per-cluster basis and authenticate in one of two ways, as configured in the [Resource Model Plugin](/manual/projects/resource-model-sources/) used to fetch the nodes. This configuration is controlled by the `Use Pod Service Account for Node Steps` option:
31+
32+
1. When disabled, the plugin uses the cloud provider credentials set in the resource model to retrieve the
33+
kube-config for the targeted cluster.
34+
35+
2. When enabled, the [Enterprise Runner](/administration/runner/) must be placed in the cluster and uses its pod's K8s service account for authentication.
36+
37+
## Notes
38+
39+
- The plugin uses a field manager named "runbook-automation/apply-patch" for tracking changes.
40+
- Ensure that the YAML definition provided is complete and correct for the object you're updating.

0 commit comments

Comments
 (0)