kubecertinit

command
v0.10.68 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command kubecertinit requests a TLS certificate for the Pod it runs in.

Deprecated: the init-container flow issues one certificate per Pod start and never renews it. New workloads use the operator (kubeca -enable-operator) with a Certificate resource or the kubeca.effectivesecurity/inject label (Documentation/design/operator.md); kubecertinit is kept for the migration period.

It is meant to run as an init container: it generates an ECDSA P-256 key, builds a CSR with the names derived from the Pod and its Services (-query-k8s) plus the explicit -san values, creates a certificates.k8s.io/v1 CertificateSigningRequest for the given -signer (`<issuer-label>/<profile>`), waits until kubeca signs it, and writes tls.key, tls.csr and tls.crt into -cert-dir, which the application containers share through a volume.

Usage:

kubecertinit -namespace=$(NAMESPACE) -pod-name=$(POD_NAME) \
    -signer=kubeca.svc/peer -cert-dir=/etc/tls -query-k8s \
    -san=spiffe://example/ns/$(NAMESPACE)/sa/web,$(POD_IP)

The exit status is 2 on any error, including the -timeout (10 minutes by default; 0 waits for ever) elapsing while the CSR is pending.

Jump to

Keyboard shortcuts

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