oc-adm-create-master-certs man page

oc adm create-master-certs -

Synopsis

oc adm create-master-certs [Options]

Description

Create keys and certificates for a master

This command creates keys and certs necessary to run a secure master. It also creates keys, certificates, and configuration necessary for most related infrastructure components that are clients to the master. See the related "create-node-config" command for generating per-node config.

All files are expected or created in standard locations under the cert-dir.

openshift.local.config/master/
    ca.{crt,key,serial.txt}
    master.server.{crt,key}
    openshift-router.{crt,key,kubeconfig}
    admin.{crt,key,kubeconfig}
    ...

Note that the certificate authority (CA aka "signer") generated automatically is self-signed. In production usage, administrators are more likely to want to generate signed certificates separately rather than rely on a generated CA. Alternatively, start with an existing signed CA and have this command use it to generate valid certificates.

This command would usually only be used once at installation. If you need to regenerate the master server cert, DO NOT use --overwrite as this would recreate ALL certs including the CA cert, invalidating any existing infrastructure or client configuration. Instead, delete/rename the existing server cert and run the command to fill it in:

mv openshift.local.config/master/master.server.crt{,.old}
oc adm create-master-certs --cert-dir=... \
        --master=https://internal.master.fqdn:8443 \
        --public-master=https://external.master.fqdn:8443 \
        --hostnames=external.master.fqdn,internal.master.fqdn,localhost,127.0.0.1,172.17.42.1,kubernetes.default.local

Alternatively, use the related "ca create-server-cert" command to explicitly create a certificate.

Regardless of --overwrite, the master server key/cert will be updated if --hostnames does not match the current certificate. Regardless of --overwrite, .kubeconfig files will be updated every time this command is run, so always specify --master (and if needed, --public-master). This is designed to match the behavior of "start" which rewrites certs/confs for certain configuration changes.

Options

--cert-dir="openshift.local.config/master"
The certificate data directory.
--certificate-authority=[]
Optional files containing signing authorities to use (in addition to the generated signer) to verify the API server's serving certificate.
--hostnames=[]
Every hostname or IP that server certs should be valid for (comma-delimited list)
--master=" ⟨https://localhost:8443"⟩
The API server's URL.
--overwrite=false
Overwrite all existing cert/key/config files (WARNING: includes signer/CA)
--public-master=""
The API public facing server's URL (if applicable).
--signer-name="openshift-signer@<current_timestamp>"
The name to use for the generated signer.

Options Inherited from Parent Commands

--api-version=""
DEPRECATED: The API version to use when talking to the server

--as=""
Username to impersonate for the operation.

--client-certificate=""
Path to a client certificate file for TLS.

--client-key=""
Path to a client key file for TLS.

--cluster=""
The name of the kubeconfig cluster to use

--config=""
Path to the config file to use for CLI requests.

--context=""
The name of the kubeconfig context to use

--google-json-key=""
The Google Cloud Platform Service Account JSON Key to use for authentication.

--insecure-skip-tls-verify=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.

--log-flush-frequency=0
Maximum number of seconds between log flushes

--match-server-version=false
Require server version to match client version

-n, --namespace=""
If present, the namespace scope for this CLI request.

--server=""
The address and port of the Kubernetes API server

--token=""
Bearer token for authentication to the API server.

--user=""
The name of the kubeconfig user to use

See Also

oc-adm(1),

History

June 2016, Ported from the Kubernetes man-doc generator

Referenced By

oc-adm(1).

Openshift CLI User Manuals Openshift June 2016