> ## Documentation Index
> Fetch the complete documentation index at: https://sariva.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create the runtime Secret

> Create the Kubernetes Secret consumed by the Sariva platform Helm chart.

ⓘINFO

**After the wizard — not a wizard prompt.** The wizard emits `setup-secret.sh`; this page tells you how to populate and run it before Helm install.

ⓘINFO

**Kubernetes paths only.** On the [Linux VM (Docker) path](https://sariva.mintlify.site/deploy/vm-docker-cc.md) there is no Kubernetes Secret and no `setup-secret.sh` — the same keys live as plain variables in the wizard-emitted `.env` file. Fill that instead: [VM page, section 5](https://sariva.mintlify.site/deploy/vm-docker-cc.md#5-fill-the-env).

The Sariva platform pod reads runtime secrets from a Kubernetes Secret named `sariva-platform-extras` in the `sariva-platform` namespace.

## Secret name and namespace

| Field | Value |
| - | - |
| Namespace | `sariva-platform` |
| Secret name | `sariva-platform-extras` |
| Created by | `setup-secret.sh` |
| Consumed by | Helm chart through `--set auth.existingSecret=sariva-platform-extras` |

## Fill the generated script

Open the generated script:

```bash theme={null}
${EDITOR:-vim} setup-secret.sh
```

Populate the placeholders that match your selected integrations.

| Key | Required when | Notes |
| - | - | - |
| `SARIVA_AUTH_PEPPER` | Always | Generate with `openssl rand -hex 16`. |
| `SARIVA_PLATFORM_API_KEY` | Always | Canonical admin REST bearer. Use a value shaped like `sariva_<hex>`. |
| `ANTHROPIC_API_KEY` | Claude API selected | Required for Claude backend. |
| `SLACK_BOT_TOKEN` | Slack enabled | Bot token from Slack app installation. |
| `SLACK_APP_TOKEN` | Slack Socket Mode enabled | App-level token with `connections:write`. |
| `GITHUB_TOKEN` | GitOps enabled | Sariva platform GitHub token used by the platform to open pull requests. |
| `PAGERDUTY_ROUTING_KEY` | `paging.provider: pagerduty` | The Events API v2 integration key. Only the selected paging provider's keys are templated. |
| `XMATTERS_API_KEY` / `XMATTERS_API_SECRET` | `paging.provider: xmatters` | The xMatters API key + secret (HTTP Basic). The trigger URL is not a secret — it lives in `values.yaml::paging.xmatters.triggerUrl`. |
| `CC_METRICS_API_KEY` / `CC_METRICS_API_SECRET` | Confluent Cloud observability | Org-scoped Confluent Cloud metrics key for the Sariva service account. |

## Before you run the script

The script talks to your Kubernetes API. For AWS EKS, make sure the operator running the script is authenticated to the correct cluster and has enough Kubernetes RBAC to create the namespace and manage the Secret.

```bash theme={null}
export AWS_REGION="us-east-1"
export EKS_CLUSTER_NAME="<your-eks-cluster-name>"

aws sts get-caller-identity
aws eks update-kubeconfig --region "$AWS_REGION" --name "$EKS_CLUSTER_NAME"
kubectl config current-context
kubectl get nodes
```

⚠WARNING

Do **not** run `setup-secret.sh` until `kubectl get nodes` works against the target EKS cluster. If your kubeconfig points to the wrong cluster, the script creates the namespace and Secret in the wrong place.

Check the Kubernetes permissions for the current identity:

```bash theme={null}
kubectl auth can-i get nodes
kubectl auth can-i get namespaces
kubectl auth can-i create namespaces
kubectl auth can-i patch namespaces
kubectl auth can-i create secret -n sariva-platform
kubectl auth can-i update secret -n sariva-platform
kubectl auth can-i patch secret -n sariva-platform
```

Expected result for the unmodified generated script: each command should return `yes`. You may also see warnings such as `resource 'nodes' is not namespace scoped` or `resource 'namespaces' is not namespace scoped`. Those warnings are normal because `nodes` and `namespaces` are cluster-scoped Kubernetes resources. The important part is the final `yes` or `no` result.

If your organization pre-creates namespaces and does not grant namespace create/patch access to application operators, have a cluster administrator handle the namespace step before you run the Secret creation.

ⓘINFO

`setup-secret.sh` creates the `sariva-platform` namespace if it does not already exist, then creates or replaces the `sariva-platform-extras` Secret. The operator therefore needs namespace-level access for `sariva-platform` and, if the namespace does not exist yet, cluster-level permission to create namespaces.

ⓘINFO

If your organization does not allow application operators to create or patch namespaces, ask a cluster administrator to create `sariva-platform` first and either run the generated script for you or approve removing/commenting the namespace-creation line from `setup-secret.sh`. The operator who runs the remaining Secret command still needs create/update/patch access to Secrets in `sariva-platform`.

## Create the Secret

```bash theme={null}
bash setup-secret.sh
```

The script prints the generated admin bearer. Copy it immediately and store it in your approved password vault or secret manager.

⚠WARNING

Save the printed `sariva_...` value now. It is your `platform_admin` REST bearer and is only shown in clear text by the script output. Do **not** commit it, paste it into tickets, or store it in chat.

Example successful output:

```text theme={null}
namespace/sariva-platform created
secret/sariva-platform-extras created
Secret 'sariva-platform-extras' applied to namespace 'sariva-platform'.

================================================================================
ADMIN BEARER — save this now; it is your platform_admin REST key:

  sariva_<generated-admin-bearer>

The pod seeds it at startup (no kubectl exec). Authenticate with:
  Authorization: Bearer <key>     (or: export SARIVA_PLATFORM_API_KEY=<key>)
================================================================================
```

If the namespace or Secret already exists, the exact first two lines may say `configured`, `unchanged`, or show an apply-style replacement result instead of `created`.

Validate the Secret exists:

```bash theme={null}
kubectl -n sariva-platform get secret sariva-platform-extras
```

Expected result:

```text theme={null}
NAME                     TYPE     DATA   AGE
sariva-platform-extras   Opaque   ...    ...
```

## Admin REST bearer

`SARIVA_PLATFORM_API_KEY` is the admin REST bearer. The pod seeds this value on startup and you use it with `Authorization: Bearer ...`.

If you need it in your shell later, export the saved value:

```bash theme={null}
export SARIVA_PLATFORM_API_KEY="sariva_<generated-admin-bearer>"
```

## Continue the deployment path

> [card] [Next: wire pod AWS identity](https://sariva.mintlify.site/install-setup/irsa.md)
>
> Continue here if the Sariva pod needs access to AWS services such as Secrets Manager, SSM, CloudWatch, MSK IAM, or Bedrock.

> [card] [Skip pod AWS identity](https://sariva.mintlify.site/install-setup/deploy-platform.md)
>
> Use this only if your selected path does not use any AWS-backed runtime features. Continue directly to Helm install.

> [card] [Back to deployment path](https://sariva.mintlify.site/deploy/aws-eks-cc.md)
>
> Return to the supported deployment path checklist.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.