侧边栏壁纸
博主头像
码途 博主等级

行动起来,活在当下

  • 累计撰写 72 篇文章
  • 累计创建 0 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录
k8s

k8s部署minio单机版

htmltoo
2023-12-13 / 0 评论 / 0 点赞 / 3 阅读 / 0 字

1-部署NFS

mkdir /nfs_data/minio_data
chmod -R 777 /nfs_data/minio_data

2-创建命名空间minio

kubectl create ns minio

3-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: 512Mi
            cpu: 50m
          limits:
            memory: 512Mi
            cpu: 100m
        volumeMounts:
          - mountPath: /data
            name: data
      volumes:
      - nfs:
          server: 192.168.1.3
          path: /nfs_data/minio_data
        name: data

4-创建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

5-访问minio

http://192.168.1.4:29001/

默认账号/密码:minioadmin/minioadmin

0

评论区