How to use or test minio health cluster endpoint - cniackz/public GitHub Wiki
Objective:
To explain how to use http://minio.tenant-lite.svc.cluster.local/minio/health/cluster
endpoint
Summary:
minio/health/cluster
endpoint tells Operator
when MinIO
is ready.
Steps:
-
Have a cluster ready
-
Deploy Operator
-
Deploy a Tenant
-
Open Operator Pod and post with curl:
bash-4.4$ curl http://minio.tenant-lite.svc.cluster.local/minio/health/cluster -v
* Trying 10.96.135.239...
* TCP_NODELAY set
* Connected to minio.tenant-lite.svc.cluster.local (10.96.135.239) port 80 (#0)
> GET /minio/health/cluster HTTP/1.1
> Host: minio.tenant-lite.svc.cluster.local
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Content-Length: 0
< Content-Security-Policy: block-all-mixed-content
< Server: MinIO
< Strict-Transport-Security: max-age=31536000; includeSubDomains
< Vary: Origin
< X-Amz-Request-Id: 17355F430404E5F1
< X-Content-Type-Options: nosniff
< X-Minio-Write-Quorum: 6
< X-Xss-Protection: 1; mode=block
< Date: Thu, 29 Dec 2022 20:59:38 GMT
<
* Connection #0 to host minio.tenant-lite.svc.cluster.local left intact
- Kill MinIO Server Pods in the Tenant and keep posting, you get
503
becauseMinIO
is not ready:
bash-4.4$ curl http://minio.tenant-lite.svc.cluster.local/minio/health/cluster -v
* Trying 10.96.135.239...
* TCP_NODELAY set
* Connected to minio.tenant-lite.svc.cluster.local (10.96.135.239) port 80 (#0)
> GET /minio/health/cluster HTTP/1.1
> Host: minio.tenant-lite.svc.cluster.local
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 503 Service Unavailable
< Accept-Ranges: bytes
< Content-Length: 0
< Content-Security-Policy: block-all-mixed-content
< Server: MinIO
< Strict-Transport-Security: max-age=31536000; includeSubDomains
< Vary: Origin
< X-Amz-Request-Id: 17355F4DD8C5D871
< X-Content-Type-Options: nosniff
< X-Minio-Server-Status: offline
< X-Xss-Protection: 1; mode=block
< Date: Thu, 29 Dec 2022 21:00:24 GMT
<
* Connection #0 to host minio.tenant-lite.svc.cluster.local left intact
- Once MinIO is ready, post again and you get
200
meaningMinIO
is ready:
All MinIO sub-systems initialized successfully in 32.593488973s
MinIO Object Storage Server
Copyright: 2015-2022 MinIO, Inc.
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Version: RELEASE.2022-12-07T00-56-37Z (go1.19.3 linux/arm64)
Use `mc admin info` to look for latest server/drive info
Status: 6 Online, 2 Offline.
API: http://minio.tenant-lite.svc.cluster.local
Console: http://10.244.4.15:9090 http://127.0.0.1:9090
Documentation: https://min.io/docs/minio/linux/index.html
bash-4.4$ curl http://minio.tenant-lite.svc.cluster.local/minio/health/cluster -v
* Trying 10.96.135.239...
* TCP_NODELAY set
* Connected to minio.tenant-lite.svc.cluster.local (10.96.135.239) port 80 (#0)
> GET /minio/health/cluster HTTP/1.1
> Host: minio.tenant-lite.svc.cluster.local
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Content-Length: 0
< Content-Security-Policy: block-all-mixed-content
< Server: MinIO
< Strict-Transport-Security: max-age=31536000; includeSubDomains
< Vary: Origin
< X-Amz-Request-Id: 17355F5CA1289AA2
< X-Content-Type-Options: nosniff
< X-Minio-Write-Quorum: 6
< X-Xss-Protection: 1; mode=block
< Date: Thu, 29 Dec 2022 21:01:28 GMT
<
* Connection #0 to host minio.tenant-lite.svc.cluster.local left intact