diff --git a/src/k8s/pkg/k8sd/app/hooks_start.go b/src/k8s/pkg/k8sd/app/hooks_start.go index 3728537c6..4381a4493 100644 --- a/src/k8s/pkg/k8sd/app/hooks_start.go +++ b/src/k8s/pkg/k8sd/app/hooks_start.go @@ -22,8 +22,9 @@ func (a *App) onStart(s *state.State) error { if err != nil { return nil, fmt.Errorf("failed to load RSA key from configuration: %w", err) } + keyPEM := cfg.Certificates.GetK8sdPublicKey() key, err := pki.LoadRSAPublicKey(cfg.Certificates.GetK8sdPublicKey()) - if err != nil { + if err != nil && keyPEM != "" { return nil, fmt.Errorf("failed to load RSA key: %w", err) } return key, nil