# Getting started

> Install Stackable Cockpit on Kubernetes with Helm, connect it to an OIDC provider, PostgreSQL and Trino, and run your first SQL query.

This guide installs Cockpit with Helm and runs a first Trino query. You need:

-   a PostgreSQL database,

-   an OIDC client for Cockpit with the redirect URI `[https://cockpit.example.com/api/auth/callback/oidc](https://cockpit.example.com/api/auth/callback/oidc)`, see the [authentication](https://docs.stackable.tech/home/stable/cockpit/installation/authentication/index.md) page for more details,

-   a Trino cluster,

-   the [Stackable Secret Operator](https://docs.stackable.tech/home/stable/secret-operator/index.md),

-   an Ingress or reverse proxy that serves `[https://cockpit.example.com](https://cockpit.example.com)`.


Create a Secret with the database password and the OIDC client secret:

```console
$ kubectl create secret generic cockpit \
  --from-literal=database-password='<database password>' \
  --from-literal=oidc-client-secret='<OIDC client secret>'
```

Create a values file `cockpit-values.yaml`:

```yaml
origin: https://cockpit.example.com (1)
auth:
  baseUrl: https://cockpit.example.com
  oidc:
    discoveryUrl: https://keycloak.example.com/realms/sdp/.well-known/openid-configuration
    clientId: cockpit
    clientSecret:
      secretKeyRef:
        name: cockpit
database:
  host: postgresql
  password:
    secretKeyRef:
      name: cockpit
trino:
  url: https://trino-coordinator-default-headless:8443 (2)
tls:
  secretClasses:
    - tls (3)
```

(1) The URL users open in the browser. It must use HTTPS, see [Ingress and reverse proxy](https://docs.stackable.tech/home/stable/cockpit/installation/helm/index.md).
(2) Optional. Without `trino.url`, each user enters a Trino connection in Cockpit, see [Connection](https://docs.stackable.tech/home/stable/cockpit/modules/trino/index.md).
(3) The SecretClass that provides the CA certificate of PostgreSQL and Trino, see [CA certificates](https://docs.stackable.tech/home/stable/cockpit/installation/helm/index.md).

Install the chart:

```console
$ helm install cockpit oci://oci.stackable.tech/sdp-charts/cockpit --version 26.11.0 --values cockpit-values.yaml
```

Open the URL in a browser, log in, select **Trino** in the sidebar and run a query such as `SELECT * FROM system.runtime.nodes`.
