Skip to content

Commit 1898f53

Browse files
authored
KLOS support for script steps (#2992)
* KLOS support for script steps * Update mod date * Clarify which script steps are supported
1 parent 6505614 commit 1898f53

2 files changed

Lines changed: 57 additions & 7 deletions

File tree

src/pages/docs/kubernetes/live-object-status/index.md

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Using Kubernetes Live Object Status requires the following:
2323
- Octopus Deploy 2025.3+
2424
- A [Kubernetes Agent](/docs/kubernetes/targets/kubernetes-agent) target
2525
- A project with a deployment process containing Kubernetes steps
26-
- The kubectl script step is currently unsupported
2726

2827
## How to use Live Status
2928

@@ -45,7 +44,7 @@ Octopus display individual status at an object level as well as summarized statu
4544
| :---------- | :------------------------------------------------: | :-------------------------------------------------------------------------- |
4645
| Progressing | <i class="fa-solid fa-circle-notch blue"></i> | Objects in your application are currently in a progressing state |
4746
| Healthy | <i class="fa-solid fa-heart green"></i> | The objects in your cluster match what was specified in the last deployment |
48-
| Unknown | <i class="fa-solid fa-question grey"></i> | Were having trouble getting live status updates for this application |
47+
| Unknown | <i class="fa-solid fa-question grey"></i> | We're having trouble getting live status updates for this application |
4948
| Degraded | <i class="fa-solid fa-heart-crack red"></i> | Your objects experienced errors after the deployment completed |
5049
| Out of Sync | <i class="fa-solid fa-arrow-up orange"></i> | The objects on your cluster no longer match what you last deployed |
5150
| Missing | <i class="fa-solid fa-ghost grey"></i> | Objects in your application are currently in a missing state |
@@ -116,6 +115,61 @@ The Kubernetes Agent has a new component called the Kubernetes monitor which als
116115

117116
During a deployment, Octopus will capture any applied Kubernetes manifests and send them to the monitor. The monitor uses these manifests to track the deployed objects in the cluster, keeping track of their synchronization and health.
118117

118+
### Script steps
119+
120+
The built in Kubernetes steps will automatically report the applied manifests for deployments, however Octopus needs a bit of help when you're making changes using kubectl script steps.
121+
122+
To notify Octopus which Kubernetes resources you want tracked, we have bash and powershell helper functions available to use. You can choose between passing the manifest as a variable, or passing the file path directly instead.
123+
124+
Only the "Run a kubectl script" step will correctly report manifests, regular "Run a script" steps are not supported.
125+
126+
:::div{.info}
127+
You still need to apply the Kubernetes manifests to your cluster. These functions only notify Octopus that you expect the resources to be created.
128+
:::
129+
130+
Available in Octopus server versions:
131+
132+
- 2025.4.10333+
133+
- 2026.1.4557+
134+
135+
#### Bash
136+
137+
```bash
138+
read -r -d '' manifest << EOM
139+
apiVersion: v1
140+
kind: Namespace
141+
metadata:
142+
name: "example"
143+
labels:
144+
name: "example"
145+
EOM
146+
147+
report_kubernetes_manifest "$manifest"
148+
```
149+
150+
```bash
151+
report_kubernetes_manifest_file "$ManifestFilePath"
152+
```
153+
154+
#### Powershell
155+
156+
```pwsh
157+
$manifest = @"
158+
apiVersion: v1
159+
kind: Namespace
160+
metadata:
161+
name: "example"
162+
labels:
163+
name: "example"
164+
"@
165+
166+
Report-KubernetesManifest -manifest $manifest
167+
```
168+
169+
```pwsh
170+
Report-KubernetesManifestFile -path $ManifestFilePath
171+
```
172+
119173
## User permissions
120174

121175
Viewing the data returned from the Kubernetes monitor from within Octopus requires `DeploymentView` permissions.
@@ -169,10 +223,6 @@ The desired object list is compiled from objects that were applied during the la
169223

170224
Please avoid skipping steps that deploy Kubernetes objects.
171225

172-
### Script steps are not supported
173-
174-
Objects modified by script steps directly are not monitored. Support for script steps is planned for a future release.
175-
176226
### Runbooks are not supported
177227

178228
Objects modified by Runbooks are not monitored. Please deploy the objects via a Deployment if you want them to be monitored.

src/pages/docs/kubernetes/live-object-status/troubleshooting/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: src/layouts/Default.astro
33
pubDate: 2025-03-28
4-
modDate: 2025-12-08
4+
modDate: 2026-01-21
55
navTitle: Troubleshooting
66
title: Troubleshooting
77
navSection: Troubleshooting

0 commit comments

Comments
 (0)