> 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/harness-platform/knowledge-base-and-faqs/articles/cross-ns-delegate.md).

# Cross-namespace access for Harness Delegates

### Install delegate <a href="#install-delegate" id="install-delegate"></a>

[Install a delegate](/harness-platform/use-harness-platform/delegates/delegate/install-delegates/overview.md#install-the-helm-chart) into your kubernetes cluster using helm.

The service account created via the delegate helm chart has the same as the delegate.

### Create Role <a href="#create-role" id="create-role"></a>

Create a Role in the target namespace with the necessary permissions launch container based steps:

```
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: harness-container-steps
  namespace: target
rules:
  - apiGroups: [""]
    resources: ["pods", "secrets"]
    verbs: ["get", "list", "watch", "create", "update", "delete"]
  - apiGroups: [""]
    resources: ["events"]
    verbs: ["list", "watch"]
```

### Create RoleBinding <a href="#create-rolebinding" id="create-rolebinding"></a>

Create a RoleBinding object in the target namespace to bind the Role to the delegate service account:

```
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: harness-container-steps
  namespace: target
subjects:
  - kind: ServiceAccount
    name: <delegate service account name>
    namespace: <delegate namespace>
roleRef:
  kind: Role
  name: harness-container-steps
  apiGroup: rbac.authorization.k8s.io
```

### Conclusion <a href="#conclusion" id="conclusion"></a>

Now the delegate service account has access to create pods for Harness CI/IacM/Container Steps in the target namespace.
