NetApp / trident

Storage orchestrator for containers
Apache License 2.0
759 stars 222 forks source link

Trident install on MKE(Mirantis Kubernetis ) is not working #751

Open eselvam opened 2 years ago

eselvam commented 2 years ago

Describe the bug

After install of the trident, while provisioning the volume in pod, we are getting below error in pod events.

tridentorchestrator/trident Failed to install Trident; err: failed to create the Trident DaemonSet; failed to create or patch Trident daemonset; could not patch Trident DaemonSet; daemonsets.apps "trident-csi" is forbidden: non-admin user "trident:trident-operator" [service account "trident:trident-csi"]. The configured privileged attributes access for non-admin users ("[]")("[]") and for service accounts ("[]")("[]") lack required permissions to use attributes [hostbindmounts hostipc hostnetwork hostpid kernelcapabilities privileged] for resource trident-csi

Environment MKE 3.4.x

To Reproduce Steps to reproduce the behavior: follow the installation procedure in the trident document. while provisioning the nginx pod, you will get the above error

Expected behavior pod should mount and start the pod

Additional context Add any other context about the problem here.

gnarl commented 2 years ago

@eselvam, the error that is listed appears to be from a failed Trident installation and not the Pod itself. It appears that the user used to install Trident did not have the level of permissions needed to successfully install Trident. Please contact NetApp support if you need additional assistance in resolving this issue.

eselvam commented 2 years ago

Thanks. I installed using admin account in MKE. So, we can ignore that part. It seems the service account does not have privileges even it has from the kubectl get podsecuritypolicy and the trident-main as securitycontext as Sys_admin. It should work but not in my case.

I am doing the clean install again to see if it helps then I will post the update. Thanks.

rohit-arora-dev commented 2 years ago

There is a KB article for this: https://kb.netapp.com/Advice_and_Troubleshooting/Cloud_Services/Astra_Trident/Trident_install_failing_due_to_clusterrolebinding_not_allowing

eselvam commented 2 years ago

multiple issues with MKE(mirantis kubernetes)

  1. we need to provide those permission from MKE gui as admin under orchestration
  2. we need to disable trident pods scheduled on master and registry nodes by removing automatic toleration for the deployment in same admin page.

Thanks.

eselvam commented 2 years ago

The document we have with Netapp works for plain Kubernetes install not vendor based. If you come up with document for each vendor it will save time for the customers. Each Vendor kubernetes different, it won't work with standard installation instruction. Thanks.

scaleoutsean commented 2 years ago

I installed Trident with tridentctl and didn't have any issues.

eselvam commented 2 years ago

if you install trident with physical host or vm with UPI method of openshift, then you will face this issue. The scc does not have adequate privileges and it is very clear in logs as well.  If you use any other method, you won't see this issue. and more over, it is an operator based install.

On Sunday, October 9, 2022 at 11:21:48 AM GMT+5:30, scaeloutSean ***@***.***> wrote:  

I installed Trident with tridentctl and didn't have any issues.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>