# Overview

## PCD-K API Overview

PCD-K (Private Cloud Director – Kubernetes) exposes a Kubernetes-native REST API for managing workload clusters. All resources follow standard Kubernetes API conventions — requests go through an OIDC proxy that authenticates your Dex JWT and impersonates you to the management cluster.

***

### Base URL

```
https://{du-name}-{region}.{du-domain}/oidc-proxy/{keystone-tenant}/{region}
```

| Variable            | Example       | Description                                                      |
| ------------------- | ------------- | ---------------------------------------------------------------- |
| `{du-name}`         | `pcd`         | Short name of the PCD-V deployment unit                          |
| `{region}`          | `r1`          | Region code — appears **twice**: in the hostname and in the path |
| `{du-domain}`       | `example.com` | Domain suffix of the deployment unit                             |
| `{keystone-tenant}` | `service`     | Keystone project (tenant) scoping the request                    |

**Example:** `https://pcd-r1.example.com/oidc-proxy/service/r1`

***

### Namespace and tenant scoping

Every cluster resource lives inside a Kubernetes namespace on the management cluster. The namespace encodes the customer, Keystone domain, and Keystone tenant:

```
{du-name}-{keystone-domain}-{keystone-tenant}
```

| Segment             | Example   | Description                         |
| ------------------- | --------- | ----------------------------------- |
| `{du-name}`         | `pcd`     | Same as the base URL `{du-name}`    |
| `{keystone-domain}` | `default` | Keystone domain (usually `default`) |
| `{keystone-tenant}` | `service` | Keystone project name               |

**Example namespace:** `pcd-default-service`

Pass this as the `{namespace}` path parameter in every cluster API call:

```
/apis/cluster.x-k8s.io/v1beta1/namespaces/pcd-default-service/clusters
```

All operations are automatically scoped to your tenant — you cannot read or modify clusters belonging to a different namespace.

***

### Authentication

All API requests require a Dex-issued JWT in the `Authorization` header:

```
Authorization: Bearer <dex-jwt>
```

See the Authentication section for how to obtain a token using your Keystone credentials and how to refresh it.


---

# Agent Instructions: 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:

```
GET https://docs.platform9.com/api-docs/kubernetes-service/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
