文章目录


一、部署NFS

参考:
​ubuntu16.04.4 部署NFS共享

mkdir /nfs_data/minio_data
chmod -R 777

二、创建命名空间minio

kubectl create ns minio

三、deployment

apiVersion: apps/v1
kind: Deployment
metadata:
name: minio
namespace: minio
spec:
replicas: 1
selector:
matchLabels:
app: minio
template:
metadata:
labels:
app: minio
spec:
containers:
- name: minio
image: minio/minio:latest
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- minio server /data --console-address ":5000"
ports:
- name: data
containerPort: 9000
protocol: "TCP"
- name: console
containerPort: 5000
protocol: "TCP"
resources:
requests:
memory: 128Mi
cpu: 50m
limits:
memory: 128Mi
cpu: 100m
volumeMounts:
- mountPath: /data
name: data
volumes:
- nfs:
server: 192.168.1.3
path: /nfs_data/minio_data
name:

四、创建service暴露端口

apiVersion: v1
kind: Service
metadata:
name: minio
namespace: minio
spec:
type: NodePort
ports:
- name: data
port: 9000
targetPort: 9000
protocol: TCP
nodePort: 29000
- name: console
port: 5000
targetPort: 5000
protocol: TCP
nodePort: 29001
selector:
app:

五、访问minio

​http://192.168.1.4:29001/​​​ 默认账号/密码:minioadmin/minioadmin
k8s部署minio单机版_kubernetes
k8s部署minio单机版_云原生_02

六、参考文章

k8s 部署 minio