I'm trying to configure RBAC to add new user with limited access. I'm following this tutorial: https://docs.bitnami.com/kubernetes/how-to/configure-rbac-in-your-kubernetes-cluster/#use-case-1-create-user-with-limited-namespace-access
It asks me to approve user sign request using Kubernetes CA:
Locate your Kubernetes cluster certificate authority (CA). This will be responsible for approving the request and generating the necessary certificate to access the cluster API. Its location is normally /etc/kubernetes/pki/. In the case of Minikube, it would be ~/.minikube/. Check that the files ca.crt and ca.key exist in the location.
So I need to run the command:
openssl x509 -req -in employee.csr -CA CA_LOCATION/ca.crt -CAkey CA_LOCATION/ca.key -CAcreateserial -out employee.crt -days 500
But in DigitalOcean I can't access Kubernetes internals (can't touch node droplets).
Is it possible to approve certificate sign request with DigitalOcean?
You can use the build in CA in your cluster to create client certificates.
Background information on how to use the CA: cluster-administration-certificates.
Steps to reproduce:
Example JSON file:
{
"CN": "example-user",
"key": {
"algo": "rsa",
"size": 4096
},
"names": [{
"O": "example-user",
"email": "some@email"
}]
}
kubectl get csr
kubectl certificate approve example-user
kubectl get csr example-user -o jsonpath='{.status.certificate}' | base64 -d > client.pem
Here you can find more information: certificates.