• Clayton Coleman's avatar
    When bootstrapping a client cert, store it with other client certs · 36895934
    Clayton Coleman authored
    The kubelet uses two different locations to store certificates on
    initial bootstrap and then on subsequent rotation:
    
    * bootstrap: certDir/kubelet-client.(crt|key)
    * rotation:  certDir/kubelet-client-(DATE|current).pem
    
    Bootstrap also creates an initial node.kubeconfig that points to the
    certs. Unfortunately, with short rotation the node.kubeconfig then
    becomes out of date because it points to the initial cert/key, not the
    rotated cert key.
    
    Alter the bootstrap code to store client certs exactly as if they would
    be rotated (using the same cert Store code), and reference the PEM file
    containing cert/key from node.kubeconfig, which is supported by kubectl
    and other Go tooling. This ensures that the node.kubeconfig continues to
    be valid past the first expiration.
    36895934
BUILD 1.56 KB