kubernetes: k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap Index | Files

package bootstrap

import "k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap"


Package Files


func LoadClientCert Uses

func LoadClientCert(ctx context.Context, kubeconfigPath, bootstrapPath, certDir string, nodeName types.NodeName) error

LoadClientCert requests a client cert for kubelet if the kubeconfigPath file does not exist. The kubeconfig at bootstrapPath is used to request a client certificate from the API server. On success, a kubeconfig file referencing the generated key and obtained certificate is written to kubeconfigPath. The certificate and key file are stored in certDir.

func LoadClientConfig Uses

func LoadClientConfig(kubeconfigPath, bootstrapPath, certDir string) (certConfig, userConfig *restclient.Config, err error)

LoadClientConfig tries to load the appropriate client config for retrieving certs and for use by users. If bootstrapPath is empty, only kubeconfigPath is checked. If bootstrap path is set and the contents of kubeconfigPath are valid, both certConfig and userConfig will point to that file. Otherwise the kubeconfigPath on disk is populated based on bootstrapPath but pointing to the location of the client cert in certDir. This preserves the historical behavior of bootstrapping where on subsequent restarts the most recent client cert is used to request new client certs instead of the initial token.

Package bootstrap imports 26 packages (graph) and is imported by 9 packages. Updated 2020-11-18. Refresh now. Tools for package owners.