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

portainer-lb.yaml - cannot unmarshal object into Go struct field ClusterRoleBinding.subjects of type []v1.Subject #122

Open
bubylou opened this issue Jan 26, 2023 · 0 comments

Comments

@bubylou
Copy link
Contributor

bubylou commented Jan 26, 2023

When setting up portainer on my k3s cluster using the provided command kubectl apply -n portainer -f https://downloads.portainer.io/ce2-16/portainer-lb.yaml I get an error saying Error from server (BadRequest): error when creating "portainer/portainer-account.yml": ClusterRoleBinding in version "v1" cannot be handled as a ClusterRoleBinding: json: cannot unmarshal object into Go struct field ClusterRoleBinding.subjects of type []v1.Subject. I found that in the ClusterRoleBinding under subjects was set as listed below.

subjects:
  kind: ServiceAccount
  namespace: portainer
  name: portainer-sa-clusteradmin

The issue is that these entries must be set like this instead.

subjects:
- kind: ServiceAccount
  namespace: portainer
  name: portainer-sa-clusteradmin

After changing it I was able to start up portainer and access my cluster environment. The repo looks to be correct so I'm guess that the files hosted on downloads.portainer.io are out of date. I did notice some white space issues and other formatting problems so I'll submit a PR to fix those. Hopefully that triggers a new build to be deployed to the download server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant