> For the complete documentation index, see [llms.txt](https://docs.portainer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.portainer.io/sts/user/kubernetes/more-resources/service-accounts.md).

# Service Accounts

This section lists the Service Accounts on your Kubernetes cluster. The list can be filtered by namespace. You can create a new Service Accounts via a manifest or Helm chart by clicking **Create from code**. Remove Service Accounts by checking the box next to the Service Account and clicking **Remove**.

<figure><img src="/files/SHI3bKX7zqBm2VWp9JCO" alt=""><figcaption></figcaption></figure>

### Service Account details

{% hint style="info" %}
Editing of Service Account details is disabled for resources in namespaces [marked as system](/sts/user/kubernetes/namespaces/manage.md#actions).
{% endhint %}

{% hint style="info" %}
When [registry access is added to a namespace](/sts/user/kubernetes/cluster/registries.md#managing-access), Portainer creates a registry secret and adds it to the default Service Account as an imagePullSecret, allowing Pods in the namespace to pull images from the private registry automatically. When registry access is removed, Portainer deletes the registry secret and removes it from the default Service Account while retaining any other existing imagePullSecrets.
{% endhint %}

You can view the details of a Service Account by clicking its name from the Service Account list.

The **Service account** tab displays details for the selected account. From this view you can also directly add and remove your **Image pull secrets** by selecting the **Edit** button next to your secrets.

To modify the resource, switch to the **YAML** tab where you can edit the manifest directly. Once you have made your changes, click **Apply changes**.

<figure><img src="/files/qdVYnkDySe24M60Kn1ft" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.portainer.io/sts/user/kubernetes/more-resources/service-accounts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
