clustercert

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// KubernetesConfigDir kubernetes default certificate directory
	KubernetesConfigDir = "/etc/kubernetes"

	// KubeDefaultCertPath kubernetes components default certificate directory
	KubeDefaultCertPath = "/etc/kubernetes/pki"

	// KubeDefaultCertEtcdPath etcd default certificate directory
	KubeDefaultCertEtcdPath = "/etc/kubernetes/pki/etcd"
)

Variables

This section is empty.

Functions

func CreateBasic

func CreateBasic(serverURL, clusterName, userName string, caCert []byte) *clientcmdapi.Config

cmd/kubeadm/app/util/kubeconfig/kubeconfig.go CreateBasic creates a basic, general KubeConfig object that then can be extended

func CreateJoinControlPlaneKubeConfigFiles

func CreateJoinControlPlaneKubeConfigFiles(outDir string, caCertPath, caCertName, nodeName, controlPlaneEndpoint, clusterName string) error

CreateJoinControlPlaneKubeConfigFiles will create and write to disk the kubeconfig files required by kubeadm join --control-plane workflow, plus the admin kubeconfig file used by the administrator and kubeadm itself; the kubelet.conf file must not be created because it will be created and signed by the kubelet TLS bootstrap process. If any kubeconfig files already exists, it used only if evaluated equal; otherwise an error is returned.

func CreateWithCerts

func CreateWithCerts(serverURL, clusterName, userName string, caCert []byte, clientKey []byte, clientCert []byte) *clientcmdapi.Config

cmd/kubeadm/app/util/kubeconfig/kubeconfig.go CreateWithCerts creates a KubeConfig object with access to the API server with client certificates

func CreateWithToken

func CreateWithToken(serverURL, clusterName, userName string, caCert []byte, token string) *clientcmdapi.Config

cmd/kubeadm/app/util/kubeconfig/kubeconfig.go CreateWithToken creates a KubeConfig object with access to the API server with a token

func GenerateAllKubernetesCerts

func GenerateAllKubernetesCerts(certPath, etcdCertPath, nodeName, serviceCIRD, DNSDomain string, altNames []string, nodeIP net.IP) error

GenerateAllKubernetesCerts generate all cert.

func UpdateAPIServerCertSans

func UpdateAPIServerCertSans(pkiPath string, certSans []string) error

UpdateAPIServerCertSans :renew apiserver cert sans with given ca under pkiPath.

func WriteToDisk

func WriteToDisk(filename string, kubeconfig *clientcmdapi.Config) error

WriteToDisk writes a KubeConfig object down to disk with mode 0600

Types

type Args

type Args struct {
	APIServerAltNames cert.AltNames
	NodeName          string
	NodeIP            net.IP
	DNSDomain         string
}

type CertificateConfig

type CertificateConfig struct {
	// contains filtered or unexported fields
}

type CertificateConfigFamily

type CertificateConfigFamily struct {
	// contains filtered or unexported fields
}

func (CertificateConfigFamily) GenerateAll

func (c CertificateConfigFamily) GenerateAll() error

type KubernetesCertService

type KubernetesCertService struct {
	// contains filtered or unexported fields
}

func (KubernetesCertService) GenerateKubeComponentCert

func (s KubernetesCertService) GenerateKubeComponentCert() (err error)

func (KubernetesCertService) GenerateServiceAccountKeyPair

func (s KubernetesCertService) GenerateServiceAccountKeyPair() (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL