1

我正在使用 Kind,我正在尝试创建一个用户。请检查以下命令:-

openssl genrsa -out utk.key 2048
openssl req -new -key utk.key -out utk.csr

然后我创建一个 yaml 文件:- create_user.yaml

apiVersion: certificates.k8s.io/v1
kind: CertificateSigningRequest
metadata: 
  name: utk
spec: 
  request: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURSBSRVFVRVNULS0tLS0NCk1JSUNpakNDQVhJQ0FRQXdSVEVMTUFrR0ExVUVCaE1DUVZVeEV6QVJCZ05WQkFnTUNsTnZiV1V0VTNSaGRHVXgNCklUQWZCZ05WQkFvTUdFbHVkR1Z5Ym1WMElGZHBaR2RwZEhNZ1VIUjVJRXgwWkRDQ0FTSXdEUVlKS29aSWh2Y04NCkFRRUJCUUFEZ2dFUEFEQ0NBUW9DZ2dFQkFLa2szNVdzVG9ORllQZ2pYakxFeXJUbFdzRVdEaldUQktTemljL3INCitXdVN2M1lzYlZRZFNpR09Zb2plRUozYlZDNTV0SEZLUDBManlUQzNPOVpRa01zVmw5Nkp1dlBUN2ptTEh3RVUNCjdjVnVKYVp2Sm1DQUIvckNFQjhVa1dxYjBHTnQxbWFhOTF0NXV6QWwyTWRUUUo0V0xkdUw3SzgvaGZIZnFGYmcNClhZRWNycHBsdWV6SDEvWU5OZkFoZjFQSEFmdDhxaExxT25sS3VRZmtKQ2VzN3lXbDlabzVzRTVYdFpQS3ZXOHUNCnpqQTBYbytkTUpRbVR3S1E5eFdWa1JuSkhzaEpselFxRVc1WFRuMFhwK3EwSW9HblF0QlE5MzJ1RGxybjFVbmMNCldjTStwTDVKU3BoZnNMQ3lsMGhrL0lBZXQrcFRrRC9oWi9HUEJaOVBLbjRTTlhjQ0F3RUFBYUFBTUEwR0NTcUcNClNJYjNEUUVCQ3dVQUE0SUJBUUJSZjB0Z01rRGRPbS9YdlZRRXN0bEJqMWNnNEZmdHEyRnpZU2tqeWR0UWN1ZWsNCmErK1JyclYrZ2JoNEdpSnBzT1pHSG9JUG5XTldXUWk4VjZRMjl2WkJ3RVBwb3ZMVmN0S1lHUzE4SDZlbUhmQjgNCngzdkd0T3ByWHo1RVE1MUg4Y0NUOG52czI3OTJ5TmNOUkt0VzRSOXMySVk2OE9VNDBsSWY3MmgrYW0vR0U5MEENCjNLQVptU09BRkc0cFBUbWhzaW5yYzRnWnNiNU1haU1NYXpZTDQyQWZLNXJTWjE2dzFlWWRrYWY1djF5WWZxTDUNCm5jSkxVbnlvYS9LWUc0Um5EeEhmaEQxTjU2YVA5L0cvd2RQTldXYjQ2dHAxVnFpNTNJUVFNUVlyTk0rMG9qaVINCkpVZTg3U1lYcTBLTnc1WHVhc1dOeVlvd1BUQkhNb2t5ZTZnZzlFTnQNCi0tLS0tRU5EIENFUlRJRklDQVRFIFJFUVVFU1QtLS0tLQ0K
  signerName: kubernetes.io/kube-apiserver-client
  usages: 
    - client auth

kubectl apply -f create_user.yaml

但是我收到了 Proto 错误。这是什么错误?为什么我会得到这个?

error: proto: mismatching end group marker

我究竟做错了什么?如果有人可以提供帮助,那就太好了。

4

1 回答 1

0

好吧,我刚刚遇到了同样的问题。这是因为我滥用角色来做到这一点。首先,用root安装kubernetes;其次,使用sudo添加kubernetes环境:mkdir -p $HOME/.kube, balabala...;然后就可以申请成功了。

于 2021-11-16T02:10:05.110 回答