From the course: Debugging Kubernetes

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Retrieving user certificates from kubeconfig files

Retrieving user certificates from kubeconfig files - Kubernetes Tutorial

From the course: Debugging Kubernetes

Retrieving user certificates from kubeconfig files

- [Instructor] Here's the first command that we ran to get the user's authentication information. We want to extract the client-certificate-data and client-key-data into two separate files. Client-certificate-data will be our user's certificate, and client-key-data will be the key that this certificate is paired with. Given what we know now about the config view command, this is easy to do. Go back to your --raw command that we ran earlier. What we're going to do here is at the end of this square bracket, we're going to add .user.client-certificate-data. This will give us just the certificate data, like you can see here. However, if you recall from our review of cov-configs earlier, certificates are encoded in Base64. As a result, we need to decode this. So what we're going to do is we're going to run this command again, but at the end of it, we're going to add a pipe and then provide base64 -d. This will give us a…

Contents