Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hardcoded storage class #1902

Merged

Conversation

allanrogerr
Copy link
Contributor

@allanrogerr allanrogerr commented Dec 5, 2023

Remove hardcoded storage class to allow usage of the installed, default storage class resource, and not force the usage of the standard storage class which may not exist on a particular k8s deployment.
The default storage class is automatically chosen by k8s on deployment of the minio tenant.

Test steps (using an lxc instance)

Note: The desired result is that basically the guide at https://github.com/minio/operator/tree/master/helm/operator or https://min.io/docs/minio/kubernetes/upstream/operations/install-deploy-manage/deploy-minio-tenant-helm.html#deploy-tenant-helm should work out of the box with no failures.

Persist the session even after rebooting. This is needed only on lxc instances.

loginctl enable-linger ubuntu

Install k3s. Print versions.

sudo touch /dev/kmsg
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s - --snapshotter=fuse-overlayfs
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
k3s --version

Output

k3s version v1.27.7+k3s2 (575bce76)
go version go1.20.10
sudo systemctl status k3s.service
● k3s.service - Lightweight Kubernetes
     Loaded: loaded (/etc/systemd/system/k3s.service; enabled; preset: enabled)
     Active: active (running) since Thu 2023-10-12 19:00:40 UTC; 26min ago

Install helm

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
helm version
version.BuildInfo{Version:"v3.13.1", GitCommit:"3547a4b5bf5edb5478ce352e18858d8a552a4110", GitTreeState:"clean", GoVersion:"go1.20.8"}

Install minio-operator. Print version.

helm repo add minio https://operator.min.io/
helm install \
  --namespace minio-operator \
  --create-namespace minio-operator minio/operator

Validate minio-operator running

kubectl get pods -n minio-operator
NAME                              READY   STATUS    RESTARTS   AGE
minio-operator-7d988dd6b6-lckt4   1/1     Running   0          24m
console-5756b69c9f-8s8d8          1/1     Running   0          24m
minio-operator-7d988dd6b6-swvnj   1/1     Running   0          24m

Add http Nodeport to service

kubectl patch service -n minio-operator console --type='merge' -p '{"spec":{"type": "NodePort", "ports":[{"name": "http", "port": 9090, "nodePort": 31000}]}}'

Get jwt and login e.g. http://operator-1605.minio.training:31000

kubectl -n minio-operator get secret console-sa-secret -o jsonpath="{.data.token}" | base64 --decode

Install tenant. Validate pods work. Note in this case the tenant was also edited to remove TLS for ease of testing

helm install --namespace tenant-ns --create-namespace tenant minio/tenant
kubectl --namespace tenant-ns get pods 

Add nodeport to access tenant

kubectl patch service -n tenant-ns myminio-console -p '{"spec":{"type": "NodePort", "ports":[{"name": "http-console", "port": 9090, "protocol": "TCP", "targetPort": 9090, "nodePort": 31090}]}}'

Using the default user/password, login e.g. http://operator-1605.minio.training:31090

…ce, and not force one which may not exist on the k8s deployment
@cesnietor
Copy link
Contributor

is there more guidance that need to be added, like which type of class should be used depending on their environment and such?

@allanrogerr
Copy link
Contributor Author

The default storage class is automatically chosen by k8s.

dvaldivia
dvaldivia previously approved these changes Dec 6, 2023
@bexsoft bexsoft merged commit 856c422 into minio:master Dec 6, 2023
25 checks passed
@allanrogerr allanrogerr deleted the remove-hardcoded-helm-storageclass branch December 14, 2023 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants