You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bf492de
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/guides/milvus/concepts/milvus.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,33 @@ spec:
131
131
name: milvus-storage-config
132
132
```
133
133
134
+
### spec.objectStorage.tls
135
+
136
+
Set `spec.objectStorage.tls` when the object storage serves a certificate signed by a private CA, for example Ceph RGW behind an OpenShift service CA. Without it, Milvus fails with `x509: certificate signed by unknown authority`. This field only configures how Milvus verifies the object storage server. It is separate from [`spec.tls`](/docs/guides/milvus/tls/overview.md), which secures Milvus's own listeners.
137
+
138
+
Name the CA bundle in exactly one of `caSecret` or `caConfigMap`. Both need a `name` and a `key` that holds the PEM CA certificate, in the same namespace as the Milvus object:
139
+
140
+
```yaml
141
+
spec:
142
+
objectStorage:
143
+
configSecret:
144
+
name: milvus-s3
145
+
tls:
146
+
caConfigMap:
147
+
name: openshift-service-ca.crt # an injected service CA ConfigMap in this namespace
148
+
key: service-ca.crt
149
+
```
150
+
151
+
KubeDB mounts the CA at `/milvus/object-storage-ca/ca.crt` in every Milvus pod and sets `minio.useSSL: true` and `minio.ssl.tlsCACert` in the rendered `milvus.yaml`. The endpoint still comes from the object storage secret, so set its `address` and `port` (usually `443`) for the TLS endpoint.
152
+
153
+
If the same `minio` key is set in more than one place, the last one in this order wins: KubeDB defaults, the object storage secret, `spec.objectStorage.tls`, then `spec.configuration`.
154
+
155
+
The matching Milvus archiver, backup-plugin and CSI-plugin images also use this CA. They read the effective storage settings from the generated configuration Secret, so inline overrides apply consistently to Milvus and its backup workers. An arbitrary CA path mounted only through `podTemplate` is not accessible to these workers; use `spec.objectStorage.tls` for backup-compatible private-CA configuration.
156
+
157
+
This is independent of `spec.tls`: Milvus listener TLS can be disabled while HTTPS to object storage remains enabled. A backup destination has its own TLS settings in KubeStash `BackupStorage`; supply that endpoint's CA in the credential Secret under `CA_CERT_DATA`. The two endpoints can use different CAs.
158
+
159
+
Before restoring into another namespace, create that target's object-storage credential Secret and selected CA Secret or ConfigMap there. Restore uses the target's configuration and does not replace its CA with the source database's CA.
160
+
134
161
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`:
The TLS above secures connections to Milvus. Milvus also connects to the object storage, and if that serves a certificate signed by a private CA, Milvus must trust the CA. Give KubeDB the CA with `spec.objectStorage.tls`.
313
+
314
+
Create a Secret with the CA certificate (use a ConfigMap and `caConfigMap` if the CA is published that way):
Create the object storage secret for the TLS endpoint and the Milvus object:
321
+
322
+
```yaml
323
+
apiVersion: kubedb.com/v1alpha2
324
+
kind: Milvus
325
+
metadata:
326
+
name: milvus-s3-tls
327
+
namespace: demo
328
+
spec:
329
+
version: "2.6.15"
330
+
topology:
331
+
mode: Standalone
332
+
objectStorage:
333
+
configSecret:
334
+
name: milvus-s3
335
+
tls:
336
+
caSecret:
337
+
name: s3-ca
338
+
key: ca.crt
339
+
storageType: Durable
340
+
storage:
341
+
accessModes:
342
+
- ReadWriteOnce
343
+
resources:
344
+
requests:
345
+
storage: 10Gi
346
+
deletionPolicy: WipeOut
347
+
```
348
+
349
+
The full manifest, with the `milvus-s3` secret, is in [object-storage-tls.yaml](https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/milvus/tls/yamls/object-storage-tls.yaml).
`spec.objectStorage.tls`works even when `spec.tls` is omitted. The latter controls connections to Milvus itself; it does not enable or disable HTTPS to the object storage.
358
+
359
+
Deploy the updated provisioner and webhook API together with Milvus archiver v0.2.1 or later, backup plugin v0.1.1 or later, and CSI plugin v0.2.1 or later. These versions must be published before deploying the corresponding catalog; older worker images do not contain this support. The backup workers read the operator-generated `milvus.yaml` and load the selected CA through the Kubernetes API. The storage-check Job receives a read-only CA mount. No KubeDB-issued listener certificate is needed for object-storage verification.
360
+
361
+
The backup destination uses the existing KubeStash configuration, independently of the live store:
362
+
363
+
```yaml
364
+
apiVersion: v1
365
+
kind: Secret
366
+
metadata:
367
+
name: backup-storage-credentials
368
+
namespace: demo
369
+
stringData:
370
+
AWS_ACCESS_KEY_ID: <backup-access-key>
371
+
AWS_SECRET_ACCESS_KEY: <backup-secret-key>
372
+
CA_CERT_DATA: |
373
+
<PEM CA bundle for the backup endpoint>
374
+
---
375
+
apiVersion: storage.kubestash.com/v1alpha1
376
+
kind: BackupStorage
377
+
metadata:
378
+
name: milvus-backups
379
+
namespace: demo
380
+
spec:
381
+
storage:
382
+
provider: s3
383
+
s3:
384
+
endpoint: https://backup.example.com
385
+
bucket: milvus-backups
386
+
region: us-east-1
387
+
secretName: backup-storage-credentials
388
+
usagePolicy:
389
+
allowedNamespaces:
390
+
from: Same
391
+
deletionPolicy: Delete
392
+
```
393
+
394
+
The live endpoint and backup endpoint can use different CAs. Physical backup and PITR clients keep separate trust pools. The logical backup plugin gives its external `milvus-backup` process a bundle containing both CAs and the container's normal public roots.
395
+
396
+
For restore into another namespace or object store, create the target credential and CA resources first. The target's CA is used to write restored data. Existing customer-managed resources are not overwritten from the source backup.
397
+
398
+
For a physical restore, set the source repository namespace explicitly:
399
+
400
+
```yaml
401
+
spec:
402
+
init:
403
+
archiver:
404
+
fullDBRepository:
405
+
name: source-full
406
+
namespace: source-namespace
407
+
recoveryTimestamp: "2026-11-04T12:00:00Z"
408
+
encryptionSecret:
409
+
name: backup-encryption
410
+
namespace: source-namespace
411
+
```
412
+
413
+
For a logical `RestoreSession`, use `spec.dataSource.namespace` for the source repository and `spec.target.namespace` for the target Milvus. Configure KubeStash usage policies and access for the namespaces involved. The target's object-storage Secret and selected CA must exist in the target namespace; the source CA is not copied over them.
414
+
415
+
Physical backup, PITR and CSI workers currently require object-storage access keys. IAM-only authentication is not supported by those workers.
416
+
417
+
418
+
### Certificate renewal
419
+
420
+
New backup and restore jobs load the current CA when they start. The continuous archiver checks configuration and CA changes every minute and reconnects from its last published checkpoint. A bad replacement certificate stops progress rather than disabling verification.
421
+
422
+
To renew a private CA, first publish a bundle containing both the old and new CA. Restart Milvus pods through the existing restart workflow so they reload trust, then change the storage server certificate. Remove the old CA after clients have switched and restart Milvus again. The mounted file alone does not guarantee that a running Milvus process reloads it.
423
+
424
+
For OpenShift service certificates, use a ConfigMap annotated with `service.beta.openshift.io/inject-cabundle: "true"` and select its `service-ca.crt` key. The OpenShift service-CA controller owns that bundle.
425
+
426
+
### Verify
427
+
428
+
The CA is mounted in the pod and the rendered configuration enables TLS to the object storage:
429
+
430
+
```bash
431
+
$ kubectl exec -n demo milvus-s3-tls-0 -- ls /milvus/object-storage-ca
432
+
ca.crt
433
+
434
+
$ CS=$(kubectl get petset -n demo milvus-s3-tls -o jsonpath='{.spec.template.spec.volumes[?(@.name=="milvus-config")].secret.secretName}')
0 commit comments