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

Unable to setup krustlet on k3d #711

Open
deepu105 opened this issue Jan 12, 2022 · 0 comments
Open

Unable to setup krustlet on k3d #711

deepu105 opened this issue Jan 12, 2022 · 0 comments

Comments

@deepu105
Copy link

deepu105 commented Jan 12, 2022

While trying to install Krustlet on a k3d cluster I'm facing some issues. I was following the Guide for microK8s and trying to do similar setup in k3d. Here is what I did and the error encountered

Krustlet version used: 1.0.0-alpha.1
k3d version v5.0.1
k3s version latest (default)
OS: Fedora 35

  1. Setup a k3d cluster with bootstrap-token-auth enabled
k3d cluster create wasm-test \
--k3s-arg "--kube-apiserver-arg=enable-bootstrap-token-auth@server:0"
  1. Create bootstrap config
curl https://raw.githubusercontent.com/krustlet/krustlet/main/scripts/bootstrap.sh | /bin/bash
  1. Download Krustlet
curl -O https://krustlet.blob.core.windows.net/releases/krustlet-v1.0.0-alpha.1-linux-amd64.tar.gz
tar -xzf krustlet-v1.0.0-alpha.1-linux-amd64.tar.gz
  1. Install Krustlet
KUBECONFIG=~/.krustlet/config/kubeconfig \                           
  ./krustlet-wasi \                     
  --node-ip=127.0.0.1 \ 
  --node-name=krustlet \
  --bootstrap-file=${HOME}/.krustlet/config/bootstrap.conf

But I got User "system:bootstrap:y16pzf" cannot create resource "certificatesigningrequests" in API group "certificates.k8s.io" at the cluster scope

Full error

Error: ApiError: certificatesigningrequests.certificates.k8s.io is forbidden: User "system:bootstrap:y16pzf" cannot create resource "certificatesigningrequests" in API group "certificates.k8s.io" at the cluster scope: Forbidden (ErrorResponse { status: "Failure", message: "certificatesigningrequests.certificates.k8s.io is forbidden: User \"system:bootstrap:y16pzf\" cannot create resource \"certificatesigningrequests\" in API group \"certificates.k8s.io\" at the cluster scope", reason: "Forbidden", code: 403 })

Caused by:
    certificatesigningrequests.certificates.k8s.io is forbidden: User "system:bootstrap:y16pzf" cannot create resource "certificatesigningrequests" in API group "certificates.k8s.io" at the cluster scope: Forbidden
  1. Added a ClusterRoleBinding to see if that helps
kubectl apply -f - <<EOF                
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:                                 
  name: kubeadm:node-autoapprove-bootstrap
roleRef:                             
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole                                                     
  name: system:certificates.k8s.io:certificatesigningrequests:nodeclient
subjects:    
- kind: Group                                          
  name: system:bootstrappers:kubeadm:default-node-token
EOF

But its still gives the same error

Did I miss something or is k3d not supported? Will be happy to provide more info if needed

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