openebs/mayastor-api-restMayastor REST API服务镜像是Mayastor存储系统的核心组件,提供RESTful API接口,用于通过编程方式管理和监控Mayastor存储集群。该服务允许用户执行存储资源的创建、配置、查询和删除等操作,是自动化集成Mayastor存储系统的关键桥梁。
/api/v1),确保接口兼容性bashdocker run -d \ --name mayastor-api \ -p 8080:8080 \ -e MAYASTOR_CLUSTER_ADDR=mayastor-control-plane:50051 \ mayastor/rest-api:latest
bashdocker run -d \ --name mayastor-api-tls \ -p 8443:8443 \ -e MAYASTOR_CLUSTER_ADDR=mayastor-control-plane:50051 \ -e API_PORT=8443 \ -e TLS_ENABLED=true \ -e TLS_CERT_PATH=/certs/server.crt \ -e TLS_KEY_PATH=/certs/server.key \ -v /host/path/to/certs:/certs \ mayastor/rest-api:latest
| 环境变量 | 描述 | 默认值 |
|---|---|---|
MAYASTOR_CLUSTER_ADDR | Mayastor集群控制平面地址 | localhost:50051 |
API_PORT | API服务监听端口 | 8080 |
LOG_LEVEL | 日志级别(debug/info/warn/error) | info |
TLS_ENABLED | 是否启用TLS加密 | false |
TLS_CERT_PATH | TLS证书文件路径(TLS启用时必填) | - |
TLS_KEY_PATH | TLS私钥文件路径(TLS启用时必填) | - |
AUTH_ENABLED | 是否启用API认证 | false |
AUTH_TOKEN | API访问令牌(认证启用时必填) | - |
bashcurl http://localhost:8080/api/v1/volumes
bashcurl -X POST http://localhost:8080/api/v1/storage-pools \ -H "Content-Type: application/json" \ -d '{ "name": "pool-1", "node": "mayastor-node-01", "devices": ["/dev/sdb"] }'


manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务