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

# Quickstart

> Deploy Mistrive on Kubernetes in under 30 minutes

This guide walks through deploying a complete Mistrive installation on Kubernetes. You'll set up FoundationDB for metadata storage, then deploy DFS, Platform, and Artifact Store using the Mistrive Operator.

## Prerequisites

* Kubernetes cluster (1.25+)
* `kubectl` configured with cluster access
* Storage class supporting dynamic provisioning
* Ingress controller or Gateway API configured

***

## Install FoundationDB

Mistrive uses FoundationDB as its distributed metadata store. Deploy it using the official FoundationDB Kubernetes Operator.

### Deploy the operator

Apply the FoundationDB Operator CRDs and controller:

```bash theme={null}
kubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/main/config/crd/bases/apps.foundationdb.org_foundationdbclusters.yaml
kubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/main/config/crd/bases/apps.foundationdb.org_foundationdbbackups.yaml
kubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/main/config/crd/bases/apps.foundationdb.org_foundationdbrestores.yaml
kubectl apply -f https://raw.githubusercontent.com/foundationdb/fdb-kubernetes-operator/main/config/samples/deployment.yaml
```

### Create a cluster

Save the following as `fdb.yaml`:

```yaml theme={null}
apiVersion: apps.foundationdb.org/v1beta2
kind: FoundationDBCluster
metadata:
  name: fdb1
spec:
  version: 7.4.5
  processCounts:
    cluster_controller: 1
    storage: 2
    log: 1
    stateless: -1
  automationOptions:
    replacements:
      enabled: true
  faultDomain:
    key: foundationdb.org/none
  processes:
    general:
      customParameters:
        - knob_disable_posix_kernel_aio=1
      podTemplate:
        spec:
          containers:
            - name: foundationdb
              resources:
                requests:
                  cpu: 100m
                  memory: 128Mi
              securityContext:
                runAsUser: 0
            - name: foundationdb-kubernetes-sidecar
              resources:
                requests:
                  cpu: 100m
                  memory: 128Mi
              securityContext:
                runAsUser: 0
          initContainers:
            - name: foundationdb-kubernetes-init
              resources:
                requests:
                  cpu: 100m
                  memory: 128Mi
              securityContext:
                runAsUser: 0
      volumeClaimTemplate:
        spec:
          resources:
            requests:
              storage: 16G
  routing:
    defineDNSLocalityFields: true
  sidecarContainer:
    enableLivenessProbe: true
    enableReadinessProbe: false
  useExplicitListenAddress: true
```

Apply the cluster:

```bash theme={null}
kubectl apply -f fdb.yaml
```

Wait for all pods to reach Running state:

```bash theme={null}
kubectl get pods -l foundationdb.org/fdb-cluster-name=fdb1
```

Expected output:

```
NAME                          READY   STATUS    RESTARTS   AGE
fdb1-cluster-controller-7399  2/2     Running   0          84s
fdb1-log-54670                2/2     Running   0          84s
fdb1-storage-32179            2/2     Running   0          84s
fdb1-storage-39490            2/2     Running   0          84s
```

***

## Install Mistrive Operator

The Mistrive Operator manages DFS, Platform, and Artifact Store deployments through Kubernetes custom resources.

```bash theme={null}
kubectl apply -f https://operator.mistrive.com/installer.yaml
```

Verify the operator is running:

```bash theme={null}
kubectl -n mistrive-operator-system get pods
```

Expected output:

```
NAME                                                   READY   STATUS    RESTARTS   AGE
mistrive-operator-controller-manager-7f774d5f6-k6gtt   1/1     Running   0          22s
```

***

## Deploy DFS

DFS provides the distributed storage layer. Save the following as `dfs.yaml`:

```yaml theme={null}
apiVersion: platform.mistrive.com/v1alpha1
kind: Dfs
metadata:
  name: dfs1
spec:
  fdbName: fdb1
  repositoryOptions:
    base: us-east1.mreg.dev/mistrive-alpha-access/artifacts
    tag: v0.20251204.0
  dfd:
    replicas: 5
    volumeClaimTemplate:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: 30Gi
```

Apply the configuration:

```bash theme={null}
kubectl apply -f dfs.yaml
```

This creates:

* **MDS** (Metadata Service): Manages filesystem metadata
* **DFD** (D for Disk): Storage nodes for chunk data
* **Custodian**: Background maintenance worker

Wait for all DFS pods to start:

```bash theme={null}
kubectl get pods -l app.kubernetes.io/instance=dfs1
```

<Tip>
  For better performance, use local NVMe storage for DFD nodes. Mount drives at a dedicated path (e.g., `/mnt/dfd`) and configure `hostPath` volumes instead of network-attached storage.
</Tip>

***

## Deploy Platform

Platform provides identity management, the web console, and API services. Save the following as `platform.yaml`:

```yaml theme={null}
apiVersion: platform.mistrive.com/v1alpha1
kind: Platform
metadata:
  name: platform1
spec:
  fdbName: fdb1
  repositoryOptions:
    base: us-east1.mreg.dev/mistrive-alpha-access/artifacts
    tag: v0.20251204.0
  gatewayOptions:
    name: eg
    namespace: default
  api:
    mdsAddress: http://dfs1-mds:9182
    hostnames:
      - console-api.example.com
  ui:
    hostname: console.example.com
  cookies:
    domain: .example.com
  artifactStore:
    hostname: registry.example.com
```

<Info>
  Replace `example.com` with your actual domain. The cookie domain must start with a dot (`.`) for wildcard matching across subdomains.
</Info>

Apply the configuration:

```bash theme={null}
kubectl apply -f platform.yaml
```

This creates:

* **API server**: Backend services and authentication
* **UI**: Web management console
* **IAM Custodian**: Background IAM maintenance

<Tabs>
  <Tab title="Gateway API">
    The example above uses Gateway API. Ensure your gateway is configured and the hostnames resolve to your cluster.
  </Tab>

  <Tab title="Ingress">
    For Ingress-based routing, replace `gatewayOptions` with:

    ```yaml theme={null}
    ingressOptions:
      className: nginx
      annotations:
        cert-manager.io/cluster-issuer: your-issuer
      tls:
        - hosts:
            - console-api.example.com
            - console.example.com
          secretName: platform-tls
    ```
  </Tab>
</Tabs>

***

## Deploy Artifact Store

Artifact Store provides the container registry. Save the following as `artifactstore.yaml`:

```yaml theme={null}
apiVersion: platform.mistrive.com/v1alpha1
kind: ArtifactStore
metadata:
  name: artifactstore1
spec:
  fdbName: fdb1
  repositoryOptions:
    base: us-east1.mreg.dev/mistrive-alpha-access/artifacts
    tag: v0.20251204.0
  gatewayOptions:
    name: eg
    namespace: default
  server:
    replicas: 1
    mdsAddress: http://dfs1-mds:9182
    hostnames:
      - registry.example.com
  scanWorker:
    rescheduleSeconds: 3600
```

Apply the configuration:

```bash theme={null}
kubectl apply -f artifactstore.yaml
```

This creates:

* **Registry server**: Docker API v2 endpoint
* **Scan worker**: Vulnerability scanning with Trivy
* **GC worker**: Storage garbage collection

<Tabs>
  <Tab title="Gateway API">
    The example above uses Gateway API.
  </Tab>

  <Tab title="Ingress">
    For Ingress-based routing, replace `gatewayOptions` with:

    ```yaml theme={null}
    ingressOptions:
      className: nginx
      annotations:
        nginx.ingress.kubernetes.io/proxy-body-size: "0"
        nginx.ingress.kubernetes.io/proxy-read-timeout: "1200"
        cert-manager.io/cluster-issuer: your-issuer
      tls:
        - hosts:
            - registry.example.com
          secretName: artifactstore-tls
    ```
  </Tab>
</Tabs>

***

## Verify deployment

Check that all pods are running:

```bash theme={null}
kubectl get pods
```

Expected output shows all components healthy:

```
NAME                                          READY   STATUS    RESTARTS   AGE
artifactstore1-arts-6d84895fdf-nk4wn          1/1     Running   0          2m
artifactstore1-gc-worker-79bff4cdbc-4bh6l     1/1     Running   0          2m
artifactstore1-scan-worker-74bc676bcf-7n4h7   1/1     Running   0          2m
dfs1-custodian-7bb4d555b5-w6pvb               1/1     Running   0          10m
dfs1-dfd-0                                    1/1     Running   0          8m
dfs1-dfd-1                                    1/1     Running   0          8m
dfs1-dfd-2                                    1/1     Running   0          8m
dfs1-dfd-3                                    1/1     Running   0          7m
dfs1-dfd-4                                    1/1     Running   0          7m
dfs1-mds-787b8db65-fpdcz                      1/1     Running   0          10m
fdb1-cluster-controller-9679                  2/2     Running   0          15m
fdb1-log-39874                                2/2     Running   0          15m
fdb1-storage-45041                            2/2     Running   0          15m
fdb1-storage-66805                            2/2     Running   0          15m
platform1-api-56d44b9445-xjwbt                1/1     Running   0          5m
platform1-iam-custodian-55d679f47c-nsncn      1/1     Running   0          5m
platform1-ui-676d577d94-btrzp                 1/1     Running   0          5m
```

***

## Complete setup

Open the management console in your browser:

```
https://console.example.com
```

The setup wizard guides you through creating your first administrator account. After completing setup, you can:

* Create organizations and projects
* Configure users and service accounts
* Push container images to the registry

### Test the registry

Authenticate with your new credentials:

```bash theme={null}
docker login registry.example.com
```

Push a test image:

```bash theme={null}
docker pull alpine
docker tag alpine registry.example.com/<project>/test/alpine:latest
docker push registry.example.com/<project>/test/alpine:latest
```

***

## Next steps

<CardGroup cols={2}>
  <Card title="DFS" icon="hard-drive" href="/self-hosted/dfs">
    Learn about distributed storage configuration and scaling.
  </Card>

  <Card title="Platform" icon="grid-2" href="/self-hosted/platform">
    Configure identity management and access control.
  </Card>

  <Card title="Artifact Store" icon="box" href="/self-hosted/artifact-store">
    Set up vulnerability scanning and garbage collection.
  </Card>

  <Card title="Operator reference" icon="book">
    Detailed CRD specifications and configuration options. *(Coming soon)*
  </Card>
</CardGroup>
