Why i am having this issue with openSSL?

I am making a self signed certificate for RBAC but having issue with openSSL. any help kubernetes lovers?
i am not able to detect what’s going on… @KodeKloud @Inderpreet @kodekloud-bot @kodekloud-support3 .

$ openssl x509 -req -in rabbit.key -CA ca.crt -CAkey ca.key -CAcreateserial -out rabbit.crt -days 366
140501751308736:error:0909006C:PEM routines:get_name:no start line:../crypto/pem/pem_lib.c:745:Expecting: CERTIFICATE REQUEST

@player001 Just like the error message is reporting, you are missing the certificate request file in your command. Meaning the csr file should be part of the command too. Precisely it should be right after -req -in, but instead you are passing the key file rabbit.key.

I you haven’t generated a csr yet you should do it first. If you already have the csr file and assuming you named it rabbit.csr your original command should be instead:
openssl x509 -req -in rabbit.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out rabbit.crt -days 366.

1 Like

Sometimes can’t help it. Thanks @madkonix.

Hello player001,
Please follow this link https://kubernetes.io/docs/concepts/cluster-administration/certificates/#openssl

1 Like