22 lines
562 B
Bash
Executable File
22 lines
562 B
Bash
Executable File
gen_password() { head -c 16 /dev/urandom | sha256sum | cut -d " " -f 1; }
|
|
|
|
MINIO_ROOT_USER="minioadmin"
|
|
MINIO_ROOT_PASSWORD=$(gen_password)
|
|
|
|
kubectl create secret generic minio \
|
|
-n ops \
|
|
--from-literal=MINIO_ROOT_USER=${MINIO_ROOT_USER} \
|
|
--from-literal=MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD} \
|
|
|
|
# cat <<EOF | ssh root@strix tee /etc/rancher/k3s/registries.yaml
|
|
# mirrors:
|
|
# registry.ntwl.xyz:
|
|
# endpoint:
|
|
# - "https://registry.ntwl.xyz"
|
|
# configs:
|
|
# "registry.ntwl.xyz":
|
|
# auth:
|
|
# username: ntr
|
|
# password: pw
|
|
# EOF
|