Skip to content

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

Closed

Description

@aborrero

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).

Activity

  1. 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[/+] on Apr 26, 2023
  2. neolit123 commented on Apr 26, 2023

    @neolit123
    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

  3. neolit123 commented on Apr 26, 2023

    @neolit123
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions