使用k8s安装minio
k8s安装minio
拉取代码
git clone https://github.com/minio/minio.git
cd minio/docs/orchestration/kubernetes/
修改yaml
pv (由于我的环境只有一个node,故使用了hostpath,请根据实际情况选择pv类型)
cat << EOF > minio-standalone-pv.yaml
kind: PersistentVolume
apiVersion: v1
metadata:
name: minio-data
labels:
app: minio-data
spec:
capacity:
storage: "10Gi"
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
hostPath:
path: "/data/k8s/minio"
EOF
pvc
echo << EOF >> minio-standalone-pvc.yaml
selector:
matchLabels:
app: minio-data
EOF
安装
创建namespace
kubectl create namespace minio
创建pv
kubectl apply -f minio-standalone-pv.yaml
创建pvc
kubectl apply -n minio -f minio-standalone-pvc.yaml
创建deployment
kubectl apply -n minio -f minio-standalone-deployment.yaml
创建service
kubectl apply -n minio -f minio-standalone-service.yaml
查看登陆密码
cat /data/k8s/minio/.minio.sys/config/config.json |grep Key
"accessKey": "minio",
"secretKey": "minio123",
"routingKey": "",
网页题目:使用k8s安装minio
标题链接:http://hbruida.cn/article/jcpocj.html