minio working

This commit is contained in:
Waylon Walker 2023-10-29 18:04:02 -05:00
parent 12452de0b5
commit f997855f97
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
5 changed files with 193 additions and 6 deletions

107
minio/deployment.yaml Normal file
View file

@ -0,0 +1,107 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -o deployment.yaml -n minio --replicas 3
kompose.version: 1.31.2 (a92241f79)
creationTimestamp: null
labels:
io.kompose.service: sandcrawler
name: sandcrawler
namespace: minio
spec:
ports:
- name: "9000"
port: 9000
targetPort: 9000
- name: "9001"
port: 9001
targetPort: 9001
selector:
io.kompose.service: sandcrawler
status:
loadBalancer: {}
---
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: minio
namespace: minio
spec: {}
status: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -o deployment.yaml -n minio --replicas 3
kompose.version: 1.31.2 (a92241f79)
creationTimestamp: null
labels:
io.kompose.service: sandcrawler
name: sandcrawler
namespace: minio
spec:
replicas: 3
selector:
matchLabels:
io.kompose.service: sandcrawler
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -o deployment.yaml -n minio --replicas 3
kompose.version: 1.31.2 (a92241f79)
creationTimestamp: null
labels:
io.kompose.network/minio-default: "true"
io.kompose.service: sandcrawler
spec:
containers:
- args:
- server
- --console-address
- :9001
- /data
image: minio/minio
name: sandcrawler
ports:
- containerPort: 9000
protocol: TCP
- containerPort: 9001
protocol: TCP
resources: {}
volumeMounts:
- mountPath: /data
name: minio-storage
envFrom:
- secretRef:
name: minio-secret
restartPolicy: Always
volumes:
- name: minio-storage
persistentVolumeClaim:
claimName: minio-storage
status: {}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: minio-storage
name: minio-storage
namespace: minio
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}

View file

@ -1,17 +1,21 @@
version: '3' version: "3"
services: services:
sandcrawler: sandcrawler:
image: minio/minio image: minio/minio
ports: ports:
- "9090:9000" - 9000
- "9091:9001" - 9001
volumes: volumes:
- /mnt/vault/sandcrawler:/data - minio_storage:/data
environment: environment:
MINIO_ROOT_USER: $MINIO_ROOT_USER MINIO_ROOT_USER: waylon
MINIO_ROOT_PASSWORD: $MINIO_ROOT_PASSWORD MINIO_ROOT_PASSWORD: password
command: server --console-address ":9001" /data command: server --console-address ":9001" /data
# labels:
# kompose.service.expose: minio.wayl.one, minio-ui.wayl.one
# kompose.image-pull-secret: regcred
volumes: volumes:
minio_storage: {} minio_storage: {}

37
minio/ingress.yaml Normal file
View file

@ -0,0 +1,37 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kompose.cmd: kompose convert -o deployment.yaml -n minio --replicas 3
kompose.image-pull-secret: regcred
kompose.service.expose: minio.wayl.one, minio-ui.wayl.one
kompose.version: 1.31.2 (a92241f79)
creationTimestamp: null
labels:
io.kompose.service: sandcrawler
name: sandcrawler
namespace: minio
spec:
rules:
- host: minio.wayl.one
http:
paths:
- backend:
service:
name: sandcrawler
port:
number: 9000
path: /
pathType: Prefix
- host: minio-ui.wayl.one
http:
paths:
- backend:
service:
name: sandcrawler
port:
number: 9001
path: /
pathType: Prefix
status:
loadBalancer: {}

32
minio/justfile Normal file
View file

@ -0,0 +1,32 @@
default: cred convert deploy viz
update: convert patch
create-ns:
kubectl create ns minio
cred:
kubectl get secret -n default regcred --output=yaml -o yaml | sed 's/namespace: default/namespace: minio/' | kubectl apply -n minio -f - && echo deployed secret || echo secret exists
convert:
kompose convert -o deployment.yaml -n minio --replicas 3
deploy:
kubectl apply -f deployment.yaml
kubectl apply -f ingress.yaml
delete:
kubectl delete all --all -n minio --timeout=0s
viz:
k8sviz -n minio --kubeconfig $KUBECONFIG -t png -o minio-k8s.png
restart:
kubectl rollout restart -n minio deployment/sandcrawler
patch:
kubectl patch -f deployment.yaml
describe:
kubectl get deployment -n minio
kubectl get rs -n minio
kubectl get pod -n minio
kubectl get svc -n minio
kubectl get ing -n minio
describe-pod:
kubectl describe pod -n minio
logs:
kubectl logs --all-containers -l io.kompose.service=minio-wayl-one -n minio -f

7
minio/secret.yaml Normal file
View file

@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: minio-secret
data:
MINIO_ROOT_USER: "d2F5bG9uCg=="
MINIO_ROOT_PASSWORD: "TnpwWTRIKllCMnVncSQK"