> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/troubleshooting-and-resources/armory/general/enable-armory-agent-for-kubernetes-spinnaker-or-armory-discovery.md).

# Enable Armory Agent for Kubernetes to only discover objects that are discovered by Spinnaker (or) Ar

### Introduction <a href="#introduction" id="introduction"></a>

Unlike in a standard Spinnaker install without Armory Agent, customers who have installed Armory Agent for Kubernetes in their environment will find that the Agent discovers ***all the objects in the target cluster that the Kubernetes account has access to***. This default behavior may create default applications in Spinnaker for every deployment on the cluster, ***even if these deployments were not deployed using Spinnaker***. Spinnaker admins can restrict the scope of the discovery engine by ensuring that Armory Agent and Spinnaker only discover the objects that Spinnaker deploys.

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

Armory Enterprise Spinnaker with Armory Agent for Kubernetes enabled

### Instructions <a href="#instructions" id="instructions"></a>

When a Kubernetes object is created through Spinnaker, the Spinnaker annotations get added to them as mentioned under <https://spinnaker.io/docs/reference/providers/kubernetes-v2/#reserved-annotations>. The below example configuration should be defined in the Agent Plugin values to restrict the Armory Agent to discover only those objects deployed through Spinnaker:

```
       kubesvc:
          cluster: kubernetes
          cache: 
            operationWaitMs: 60000
          runtime:
            defaults:
              onlySpinnakerManaged: true
```

Admins looking for a similar function for individually defined Clouddriver accounts may refer to <https://docs.armory.io/armory-enterprise/armory-admin/kubernetes-account-add/#add-the-kubeconfig-and-cloud-provider-to-spinnaker> and set `onlySpinnakerManaged: true` on the specific Kubernetes accounts in Spinnaker.
