-
Notifications
You must be signed in to change notification settings - Fork 717
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
infra/upload-config/kubeadm phase fails saying creating config-maps is forbidden with user "Kubernetes-admin" #3087
Comments
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/sig cluster-lifecycle |
/transfer kubeadm |
there was a migration in kubeadm 1.29 to have separate admin.conf and super-admin.conf you can read the design here: probably your admin.conf which should be part of the
your cluster was not migrated properly and maybe you did not call |
Just to add. Mine is not an upgrade cluster. It's a standalone one at v1.30.2. My code is pretty much the same on the kubernetes level as kubeadm. Some extra things we have are come of our storage applications and other things. Let me know if you need anything else |
apply the fix i mentioned in the previous comment. |
are you calling other kubeadm phases or only upload-config? |
Almost ever single one of them. Any particular one you want me to check in particular? |
|
here is the default order of phases:
for upload-config to work, there are a number of things that must be in place:
the CRB should have been created in an earlier phase already. |
these are the order of phases that involve kubeadm
|
are you calling kubeadm source code in some sort of a forked way in your project?
|
Yes @neolit123 let me try adding the missing part to my code. I'll get back to you once I test it. Thanks |
it should work. |
Thanks @neolit123 it's working🙌🏻 |
What happened?
while I ran kubeadm init with addition to someother code of mine to bring up a Kubernetes cluster it fails with the below error
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace error execution phase infra/upload-config/kubeadm: error uploading the kubeadm ClusterConfiguration: configmaps is forbidden: User "kubernetes-admin" cannot create resource "configmaps" in API group "" in the namespace "kube-system" To see the stack trace of this error execute with --v=5 or higher
What did you expect to happen?
The config map should be created without any issues. and the init run should be done successfully.
How can we reproduce it (as minimally and precisely as possible)?
I wrote a go code calling the kubeadm init functions in it. when I start to initialise my cluster components it fails at the upload config phase
Anything else we need to know?
No response
Kubernetes version
$ kubectl version
Client Version: v1.30.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.2
Cloud provider
it's a bare metal node.
OS version
On Linux:
$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
$ uname -a
Linux ip-172-31-6-57.us-west-2.compute.internal 3.10.0-1160.76.1.el7.x86_64 kubernetes/kubernetes#1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Install tools
Container runtime (CRI) and version (if applicable)
containers version 1.7.18
Related plugins (CNI, CSI, ...) and versions (if applicable)
cni-plugins-linux-amd64-v1.5.1
The text was updated successfully, but these errors were encountered: