Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
b2e1614
Milvus docs: GPU and SR-IOV, adopting a running cluster, logical backup
Sabnaj-42 Oct 28, 2026
403b055
Milvus adopt guide: keeping the client endpoint and its ports
Sabnaj-42 Oct 29, 2026
ade84fd
Milvus adopt guide: keep the woodpecker section in the carried config
Sabnaj-42 Oct 29, 2026
c77e44d
Milvus adopt guide: keep the REST API on the gRPC port
Sabnaj-42 Oct 29, 2026
f2cd213
Milvus adopt guide: pre-flight checks found on a test adoption
Sabnaj-42 Oct 29, 2026
0cc20ca
Milvus adopt guide: kubectl dba adopt milvus, and measured handover i…
Sabnaj-42 Oct 30, 2026
f311a8d
Milvus adopt guide: options in a file, and what you must give
Sabnaj-42 Oct 30, 2026
d08c053
Milvus adopt guide: the QueryNode stall is intermittent
Sabnaj-42 Oct 30, 2026
4175945
Milvus adopt guide: keep the TLS of the cluster
Sabnaj-42 Nov 1, 2026
e4b440d
Milvus adopt guide: KubeDB takes over TLS when an issuer is available
Sabnaj-42 Nov 1, 2026
19c8c4a
Milvus guides: complete the example manifests
Sabnaj-42 Nov 1, 2026
603a91c
Document the Milvus object storage check
Sabnaj-42 Nov 2, 2026
a9fcb61
milvus adopt guide: fix commands and notes found by the doc test
Sabnaj-42 Nov 5, 2026
947c596
milvus adopt guide: object storage TLS and SR-IOV mapping
Sabnaj-42 Nov 8, 2026
4c53f69
milvus adopt guide: say what a wrong object storage CA does
Sabnaj-42 Nov 8, 2026
193d68e
milvus adopt guide: object storage TLS check before run, rollback of …
Sabnaj-42 Nov 8, 2026
854f069
docs(milvus): adoption carries the environment variables over
Sabnaj-42 Nov 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/guides/milvus/adopt/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Adopt an Existing Cluster
menu:
docs_{{ .version }}:
identifier: milvus-adopt
name: Adopt an Existing Cluster
parent: milvus-guides
weight: 95
menu_name: docs_{{ .version }}
---
408 changes: 408 additions & 0 deletions docs/guides/milvus/adopt/guide.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/guides/milvus/adopt/yamls/auth-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: milvus-root
namespace: demo
type: kubernetes.io/basic-auth
stringData:
# the root credentials the running cluster uses today
username: root
password: <current-root-password>
39 changes: 39 additions & 0 deletions docs/guides/milvus/adopt/yamls/milvus-adopt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: kubedb.com/v1alpha2
kind: Milvus
metadata:
# the Service of the same name becomes the client endpoint
name: milvus
namespace: demo
annotations:
kubedb.com/milvus-orphan-on-delete: "true"
spec:
version: "2.6.15"
deletionPolicy: DoNotTerminate
authSecret:
kind: Secret
name: milvus-root
healthChecker:
disableWriteCheck: true
metaStorage:
externallyManaged: true
endpoints:
- http://milvus-etcd.demo.svc:2379
rootPath: by-dev
objectStorage:
configSecret:
name: milvus-object-storage
configuration:
secretName: milvus-current-config
topology:
mode: Distributed
distributed:
mixcoord:
replicas: 0
datanode:
replicas: 0
querynode:
replicas: 0
streamingnode:
replicas: 0
proxy:
replicas: 0
18 changes: 18 additions & 0 deletions docs/guides/milvus/adopt/yamls/object-storage-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Secret
metadata:
name: milvus-object-storage
namespace: demo
type: Opaque
stringData:
# every key overrides the same key under minio: in milvus.yaml
address: s3.example.internal
port: "443"
useSSL: "true"
bucketName: milvus-data
rootPath: files
useIAM: "false"
cloudProvider: aws
region: us-east-1
accessKeyID: <access-key>
secretAccessKey: <secret-key>
10 changes: 10 additions & 0 deletions docs/guides/milvus/backup/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Backup & Restore
menu:
docs_{{ .version }}:
identifier: milvus-backup
name: Backup & Restore
parent: milvus-guides
weight: 140
menu_name: docs_{{ .version }}
---
10 changes: 10 additions & 0 deletions docs/guides/milvus/backup/logical/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Logical Backup
menu:
docs_{{ .version }}:
identifier: milvus-backup-logical
name: Logical Backup
parent: milvus-backup
weight: 10
menu_name: docs_{{ .version }}
---
97 changes: 97 additions & 0 deletions docs/guides/milvus/backup/logical/guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Logical Backup and Restore of Milvus | KubeStash
menu:
docs_{{ .version }}:
identifier: milvus-backup-logical-guide
name: Guide
parent: milvus-backup-logical
weight: 10
menu_name: docs_{{ .version }}
section_menu_id: guides
---

> New to KubeDB? Please start [here](/docs/README.md).

# Logical Backup and Restore of Milvus with KubeStash

A logical backup exports collections through Milvus itself with `milvus-backup`. It works for Standalone and Distributed Milvus, with a KubeDB-managed or an externally managed meta etcd, because it never reads etcd directly. It can back up and restore a subset of collections, and restore either alongside the existing collections or in place over them.

## Before You Begin

- Install [KubeStash](https://kubestash.com/docs/latest/setup/) and the KubeDB KubeStash catalog, which provides the `milvus-addon`.
- Create a `BackupStorage` and a `RetentionPolicy` in the `demo` namespace, as in the [KubeStash quickstart](https://kubestash.com/docs/latest/concepts/crds/backupstorage/).
- Have a Ready Milvus named `milvus` in `demo`.

> Note: The yaml files used in this tutorial are stored in [docs/guides/milvus/backup/logical/yamls](https://github.com/kubedb/docs/tree/{{< param "info.version" >}}/docs/guides/milvus/backup/logical/yamls) folder in GitHub repository [kubedb/docs](https://github.com/kubedb/docs).

## Parameters

Set these under `addon.tasks[].params`. All are strings.

| Task | Parameter | Default | Meaning |
|---|---|---|---|
| `logical-backup` | `collections` | `""` | Comma-separated `<db>.<collection>`. Empty backs up every collection |
| `logical-backup` | `backupTimeout` | `0s` | Hard limit on the backup, as a Go duration. `0s` means no limit |
| `logical-backup-restore` | `restoreSuffix` | `_restored` | Appended to every restored collection name |
| `logical-backup-restore` | `collections` | `""` | Comma-separated `<db>.<collection>` to restore. Empty restores every collection in the snapshot |
| `logical-backup-restore` | `inPlaceRestore` | `false` | Restore over the existing collections, replacing them. Takes precedence over the default `restoreSuffix` |
| `logical-backup-restore` | `dropExistCollection` | `false` | Drop a colliding collection in the target instead of failing |
| `logical-backup-restore` | `restoreTimeout` | `0s` | Hard limit on the restore, as a Go duration |

Users and roles are captured in every backup but are not restored. A restored user would carry the source password hash, which could lock the operator out of the target.

## Back up

```bash
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/milvus/backup/logical/yamls/backupconfiguration.yaml
$ kubectl get backupsession -n demo -w
$ kubectl get snapshot -n demo -l kubestash.com/repo-name=milvus-logical-repo
```

For a large database set `backupTimeout` well above the time a backup takes, rather than leaving it unlimited, so a hung backup fails and the next schedule runs.

## Restore

A restore writes into the Milvus named in `spec.target`. Choose one of three forms.

### Alongside, into another Milvus (recommended for verification)

Restore the latest snapshot into a separate Milvus and compare it with the source before you trust the backup. Each collection is created as `<name>_restored`:

```bash
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/milvus/backup/logical/yamls/restore-suffix.yaml
```

### Only some collections

Restore two collections next to the live ones in the source database:

```bash
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/milvus/backup/logical/yamls/restore-collections.yaml
```

The granularity is the collection. A partition cannot be restored on its own.

### In place

`inPlaceRestore: "true"` drops each restored collection in the target and recreates it from the backup. Before dropping anything, the plugin checks that the backup holds a replacement for every collection it is about to drop. Always combine it with `collections`, so only what you mean to replace is touched:

```bash
$ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/milvus/backup/logical/yamls/restore-in-place.yaml
```

Without `inPlaceRestore`, a restore always uses a suffix. Running the same restore twice fails on the second run because `<name>_restored` already exists; nothing is dropped unless you set `dropExistCollection` or `inPlaceRestore`.

## Check a restore

```bash
$ kubectl get restoresession -n demo
$ kubectl describe restoresession -n demo milvus-restore-check
```

Then compare row counts and run a few known queries against the restored collections.

## What a logical backup does not cover

- **Point-in-time recovery and physical backups** come from a `MilvusArchiver`, which needs a KubeDB-managed meta etcd dedicated to the Milvus. A Milvus with `spec.metaStorage.externallyManaged: true` can use logical backups only.
- **Partition-level restore** is not available.
37 changes: 37 additions & 0 deletions docs/guides/milvus/backup/logical/yamls/backupconfiguration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: core.kubestash.com/v1alpha1
kind: BackupConfiguration
metadata:
name: milvus-logical-backup
namespace: demo
spec:
target:
apiGroup: kubedb.com
kind: Milvus
namespace: demo
name: milvus
backends:
- name: s3-backend
storageRef:
namespace: demo
name: s3-storage
retentionPolicy:
name: demo-retention
namespace: demo
sessions:
- name: daily
scheduler:
schedule: "0 1 * * *"
jobTemplate:
backoffLimit: 1
repositories:
- name: milvus-logical-repo
backend: s3-backend
directory: /milvus/logical
addon:
name: milvus-addon
tasks:
- name: logical-backup
params:
# empty backs up every collection; otherwise comma-separated <db>.<collection>
collections: ""
backupTimeout: "6h"
21 changes: 21 additions & 0 deletions docs/guides/milvus/backup/logical/yamls/restore-collections.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: core.kubestash.com/v1alpha1
kind: RestoreSession
metadata:
name: milvus-restore-two-collections
namespace: demo
spec:
target:
apiGroup: kubedb.com
kind: Milvus
namespace: demo
name: milvus
dataSource:
repository: milvus-logical-repo
snapshot: latest
addon:
name: milvus-addon
tasks:
- name: logical-backup-restore
params:
collections: "default.products,default.reviews"
restoreSuffix: "_restored"
21 changes: 21 additions & 0 deletions docs/guides/milvus/backup/logical/yamls/restore-in-place.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: core.kubestash.com/v1alpha1
kind: RestoreSession
metadata:
name: milvus-restore-in-place
namespace: demo
spec:
target:
apiGroup: kubedb.com
kind: Milvus
namespace: demo
name: milvus
dataSource:
repository: milvus-logical-repo
snapshot: latest
addon:
name: milvus-addon
tasks:
- name: logical-backup-restore
params:
collections: "default.products"
inPlaceRestore: "true"
22 changes: 22 additions & 0 deletions docs/guides/milvus/backup/logical/yamls/restore-suffix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: core.kubestash.com/v1alpha1
kind: RestoreSession
metadata:
name: milvus-restore-check
namespace: demo
spec:
target:
apiGroup: kubedb.com
kind: Milvus
namespace: restore-check
name: milvus-check
dataSource:
repository: milvus-logical-repo
namespace: demo
snapshot: latest
addon:
name: milvus-addon
tasks:
- name: logical-backup-restore
params:
restoreSuffix: "_restored"
restoreTimeout: "6h"
10 changes: 10 additions & 0 deletions docs/guides/milvus/concepts/milvus.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ spec:
name: milvus-storage-config
```

Each Milvus needs its own object storage path: the `rootPath` key of the secret, which defaults to `files`. Before the first pod of a new Milvus starts, KubeDB checks that path. If the meta etcd is empty and the path already holds objects, the Milvus does not start, because it could not write there. KubeDB then sets the `ObjectStorageChecked` condition to `False` with reason `PathInUse`:

```bash
$ kubectl get milvus.kubedb.com -n demo milvus-standalone -o jsonpath='{.status.conditions[?(@.type=="ObjectStorageChecked")].message}'
```

To continue, clean the path or set a new `rootPath` in the secret. KubeDB checks again every minute and starts the Milvus by itself. A Milvus that already holds its metadata in etcd passes this check, for example an adopted cluster that keeps its etcd. Note that deleting a Milvus with the `Halt` policy also removes the KubeDB-managed etcd it owns, so recreating it stops at this check. If you are sure the path is safe, set the annotation `kubedb.com/milvus-skip-object-storage-check: "true"` on the Milvus. If the check cannot run, for example when S3 is unreachable or `useIAM` is set, KubeDB records a warning and starts the Milvus.

### spec.metaStorage

Milvus uses etcd as its metadata store.
Expand Down Expand Up @@ -233,6 +241,8 @@ In distributed mode, role-specific `podTemplate` blocks can also be provided und

The quickstart guides switch this to `WipeOut` before cleanup so all generated resources can be removed cleanly.

No policy removes data from object storage, including `WipeOut`. To reuse the path for a new Milvus, clean it first.

### spec.halted

`spec.halted` is used to stop the database while keeping the `Milvus` object. When halted, the operator tears down the running database workloads but retains the declarative object so it can be brought back later.
Expand Down
10 changes: 10 additions & 0 deletions docs/guides/milvus/gpu-sriov/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: GPU and SR-IOV
menu:
docs_{{ .version }}:
identifier: milvus-gpu-sriov
name: GPU and SR-IOV
parent: milvus-guides
weight: 90
menu_name: docs_{{ .version }}
---
Loading
Loading