我正在試驗 kubernetes 和 minio 部署。我有一個 k3s 4 節點集群,每個集群有 4 個 50GB 磁盤。按照此處的說明,我已經這樣做了:
首先我安裝了krew以安裝minio和directpv運算子。
我安裝了這兩個沒有問題。
我使用格式化節點中的每個可用硬碟
kubectl directpv drives format --drives /dev/vd{b...e} --nodes k3s{1...4}然后我繼續進行部署,首先我創建命名空間
kubectl create namespace minio-tenant-1,然后我實際創建租戶:kubectl minio tenant create minio-tenant-1 --servers 4 --volumes 8 --capacity 10Gi --storage-class direct-csi-min-io --namespace minio-tenant-1然后我唯一需要做的就是公開要訪問的埠,我這樣做:(
kubectl port-forward service/minio 443:443我猜這應該是實作這一目標的更好方法,因為最后一個命令顯然不是永久性的,可能使用 LoadBalancer 或Kubernetes 集群中的 NodePort 型別的服務)。
到目前為止一切順利,但我面臨一些問題:
- 當我嘗試使用mc為服務器創建別名時,提示符回復我:
mc:無法從提供的憑據初始化新別名。獲取“https://127.0.0.1/probe-bucket-sign-9aplsepjlq65/?location=": x509: 無法驗證 127.0.0.1 的證書,因為它不包含任何 IP SAN
我可以通過簡單地添加--insecure選項來超越這一點,但我不知道為什么它會拋出這個錯誤,我猜是 k3s 如何管理 TLS 自動簽名證書。
一旦使用我嘗試創建存盤桶的選項創建了服務器的別名(我將其命名為 test)
--insecure,但服務器總是回復我:mc mb test/hellomc: <ERROR> Unable to make bucket \test/hello. The specified bucket does not exist.
所以......我真的不能使用它......任何幫助將不勝感激,我需要知道我做錯了什么。
uj5u.com熱心網友回復:
以Minio 檔案中的資訊為指導。您必須生成公共證書。首先生成一個私鑰使用命令:
certtool.exe --generate-privkey --outfile NameOfKey.key
之后創建一個名為cert.cnf以下內??容的檔案:
# X.509 Certificate options
#
# DN options
# The organization of the subject.
organization = "Example Inc."
# The organizational unit of the subject.
#unit = "sleeping dept."
# The state of the certificate owner.
state = "Example"
# The country of the subject. Two letter code.
country = "EX"
# The common name of the certificate owner.
cn = "Sally Certowner"
# In how many days, counting from today, this certificate will expire.
expiration_days = 365
# X.509 v3 extensions
# DNS name(s) of the server
dns_name = "localhost"
# (Optional) Server IP address
ip_address = "127.0.0.1"
# Whether this certificate will be used for a TLS server
tls_www_server
運行certtool.exe并指定組態檔生成證書:
certtool.exe --generate-self-signed --load-privkey NameOfKey.key --template cert.cnf --outfile public.crt
最后將公共證書放入:
~/.minio/certs/CAs/
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/444614.html
標籤:Kubernetes 迷你 k3s
上一篇:在卷掛載目錄中找不到檔案
