Kubectl: error: proto: mismatching end group marker

8/4/2021

I am using Kind, and I was trying to create a user. Please check the below commands:-

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

Then I create a yaml file:- 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

But I am getting Proto error. What is this error? Why I am getting this?

error: proto: mismatching end group marker

What am I doing wrong? If anyone can help, would be great.

-- Cloud Learner
kind
kubectl
kubernetes

1 Answer

11/16/2021

well, i just met the same problems. It is because i misuse the role to do that . Firstly , install kubernetes with root;Secondly, use sudo add kubernetes environments : mkdir -p $HOME/.kube, balabala...; then ,you can apply successfully.

-- Dc_Neo
Source: StackOverflow