# Check the Installed Dynatrace Operator Version on Kubernetes

**URL:** <https://community.dynatrace.com/t/check-the-installed-dynatrace-operator-version-on-kubernetes/47691>\
**Category:** Cloud platforms\
**Tags:** google-cloud-platform, aws, azure, kubernetes\
**Created:** [September 16, 2024, 6:59am UTC](https://community.dynatrace.com/t/check-the-installed-dynatrace-operator-version-on-kubernetes/47691 "2024-09-16T06:59:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gurugogi](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@gurugogi](https://community.dynatrace.com/u/gurugogi)\
**Post date:** [September 16, 2024, 6:59am UTC](https://community.dynatrace.com/t/check-the-installed-dynatrace-operator-version-on-kubernetes/47691/1 "2024-09-16T06:59:03Z")

</div>

_Summary:&nbsp;This post provides the command used to check the Dynatrace Operator version deployed in Kubernetes. It explains where the version information resides and how to query it via kubectl._

Hi All,

Please let me know whether there is any kubectl command to check the Dynatrace operator version installed on the k8s cluster. I know we can check it from DT UI (from kubernetes UI or from Host-\>Properties UI), but I want it to fetch from the command line to automate the operator upgrade process.

Please guide, thanks.  
Guru Gogi

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [September 16, 2024, 7:16am UTC](https://community.dynatrace.com/t/check-the-installed-dynatrace-operator-version-on-kubernetes/47691/2 "2024-09-16T07:16:37Z")

</div>

```markup
kubectl exec deploy/dynatrace-operator -n dynatrace -- dynatrace-operator troubleshoot

```

The troubleshoot option reveals the version. There might be a simpler method to obtain it.

---

<div class="post-metadata">

**Author:** ![gurugogi](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@gurugogi](https://community.dynatrace.com/u/gurugogi)\
**Post date:** [September 16, 2024, 9:35am UTC](https://community.dynatrace.com/t/check-the-installed-dynatrace-operator-version-on-kubernetes/47691/3 "2024-09-16T09:35:47Z")

</div>

[@PacoPorro](https://community.dynatrace.com/user/40713)&nbsp; thanks for your reply. I know this command output has operator version, but I was checking whether we can modify this command so that it shows only operator version.

kubectl exec -n dynatrace deployment/dynatrace-operator -- dynatrace-operator support-archive --stdout \> operator-support-archive.zip

[support-archive] dynatrace-operator {“version”: “v0.11.0”, “gitCommit”: “…”, “buildDate”: “…”, “goVersion”: “…”, “platform”: “linux/amd64”}  
[support-archive] Storing operator version into operator-version.txt

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 17, 2024, 6:00am UTC](https://community.dynatrace.com/t/check-the-installed-dynatrace-operator-version-on-kubernetes/47691/4 "2024-09-17T06:00:55Z")

</div>

If you are after only the operator version you can try the below

```markup
kubectl get deployment dynatrace-operator -n dynatrace -o jsonpath='{.metadata.labels.app\.kubernetes\.io/version}'

```

---

<div class="post-metadata">

**Author:** ![gurugogi](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@gurugogi](https://community.dynatrace.com/u/gurugogi)\
**Post date:** [September 17, 2024, 6:16am UTC](https://community.dynatrace.com/t/check-the-installed-dynatrace-operator-version-on-kubernetes/47691/5 "2024-09-17T06:16:38Z")

</div>

[@p\_devulapalli](https://community.dynatrace.com/user/21657)&nbsp; thanks for reply, its working, its printing % also at the end, need to check how I can remove this % from output.  
kubectl get deployment dynatrace-operator -n dynatrace -o jsonpath=‘{.metadata.labels.app\.kubernetes\.io/version}’ 1.0.0%

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 17, 2024, 6:27am UTC](https://community.dynatrace.com/t/check-the-installed-dynatrace-operator-version-on-kubernetes/47691/6 "2024-09-17T06:27:49Z")

</div>

It should not be adding any % , may be a issue with prompt/formatting. Can you please try the below, it should output to next line clearly

```markup
kubectl get deployment dynatrace-operator -n dynatrace -o jsonpath='{.metadata.labels.app\.kubernetes\.io/version}{"\n"}'

```

---

<div class="post-metadata">

**Author:** ![gurugogi](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@gurugogi](https://community.dynatrace.com/u/gurugogi)\
**Post date:** [September 17, 2024, 7:03am UTC](https://community.dynatrace.com/t/check-the-installed-dynatrace-operator-version-on-kubernetes/47691/7 "2024-09-17T07:03:36Z")

</div>

[@p\_devulapalli](https://community.dynatrace.com/user/21657)&nbsp; this has eliminated %, thank you very much.  
kubectl get deployment dynatrace-operator -n dynatrace -o jsonpath=‘{.metadata.labels.app\.kubernetes\.io/version}{“\n”}’
