Skip to content

Feature request: kubeadm certs check-expiration output in JSON or YAML format #2866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aborrero opened this issue Apr 26, 2023 · 2 comments
Closed

Comments

@aborrero
Copy link

Thanks for your work with kubeadm, really appreciated.

We would like to get a JSON or YAML output of the certificate expiration information.

user@k8s-control:~$ sudo kubeadm certs check-expiration
[check-expiration] Reading configuration from the cluster...
[check-expiration] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'

CERTIFICATE                EXPIRES                  RESIDUAL TIME   CERTIFICATE AUTHORITY   EXTERNALLY MANAGED
admin.conf                 Apr 09, 2024 09:17 UTC   348d            ca                      no      
apiserver                  Apr 09, 2024 09:16 UTC   348d            ca                      no      
apiserver-kubelet-client   Apr 09, 2024 09:16 UTC   348d            ca                      no      
controller-manager.conf    Apr 09, 2024 09:16 UTC   348d            ca                      no      
front-proxy-client         Apr 09, 2024 09:16 UTC   348d            front-proxy-ca          no      
scheduler.conf             Apr 09, 2024 09:17 UTC   348d            ca                      no      

CERTIFICATE AUTHORITY   EXPIRES                  RESIDUAL TIME   EXTERNALLY MANAGED
ca                      Nov 03, 2029 14:13 UTC   6y              no      
front-proxy-ca          Nov 03, 2029 14:13 UTC   6y              no  

So we can easily parse the information from this output for another software (like, for example, alert if certs are about to expire).

@aborrero aborrero changed the title Feature request: kubead, certs check-expiration output in JSON or YAML format Feature request: kubeadm certs check-expiration output in JSON or YAML format Apr 26, 2023
@neolit123
Copy link
Member

this seems like a good suggestion. thank you

added it to the main issue for machine readable output:
#494

and closing this one

cc @pacoxu @SataQiu

@neolit123
Copy link
Member

@aborrero also if you or someone is willing to contribute the change, help is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants