OPENSHIFT CLI ADM(1)

NAME

openshift cli adm router - Install a router

SYNOPSIS

openshift cli adm router [OPTIONS]

DESCRIPTION

Install or configure a router

This command helps to setup a router to take edge traffic and balance it to your application. With no arguments, the command will check for an existing router service called 'router' and create one if it does not exist. If you want to test whether a router has already been created add the --dry-run flag and the command will exit with 1 if the registry does not exist.

If a router does not exist with the given name, this command will create a deployment configuration and service that will run the router. If you are running your router in production, you should pass --replicas=2 or higher to ensure you have failover protection.

OPTIONS

--create=false
    deprecated; this is now the default behavior

--credentials=""
    Path to a .kubeconfig file that will contain the credentials the router should use to contact the master.

--default-cert=""
    Optional path to a certificate file that be used as the default certificate. The file should contain the cert, key, and any CA certs necessary for the router to serve the certificate.

--dry-run=false
    If true, show the result of the operation without performing it.

--expose-metrics=false
    This is a hint to run an extra container in the pod to expose metrics - the image will either be set depending on the router implementation or provided with --metrics-image.

--external-host=""
    If the underlying router implementation connects with an external host, this is the external host's hostname.

--external-host-http-vserver=""
    If the underlying router implementation uses virtual servers, this is the name of the virtual server for HTTP connections.

--external-host-https-vserver=""
    If the underlying router implementation uses virtual servers, this is the name of the virtual server for HTTPS connections.

--external-host-insecure=false
    If the underlying router implementation connects with an external host over a secure connection, this causes the router to skip strict certificate verification with the external host.

--external-host-partition-path=""
    If the underlying router implementation uses partitions for control boundaries, this is the path to use for that partition.

--external-host-password=""
    If the underlying router implementation connects with an external host, this is the password for authenticating with the external host.

--external-host-private-key=""
    If the underlying router implementation requires an SSH private key, this is the path to the private key file.

--external-host-username=""
    If the underlying router implementation connects with an external host, this is the username for authenticating with the external host.

--force-subdomain=""
    A router path format to force on all routes used by this router (will ignore the route host value)

--host-network=true
    If true (the default), then use host networking rather than using a separate container network stack.

--host-ports=true
    If true (the default), when not using host networking host ports will be exposed.

--images="openshift/origin-${component}:${version}"
    The image to base this router on - ${component} will be replaced with --type

--labels="router=<name>"
    A set of labels to uniquely identify the router and its components.

--latest-images=false
    If true, attempt to use the latest images for the router instead of the latest release.

--metrics-image=""
    If --expose-metrics is specified this is the image to use to run a sidecar container in the pod exposing metrics. If not set and --expose-metrics is true the image will depend on router implementation.

-o, --output=""
    Output results as yaml or json instead of executing, or use name for succint output (resource/name).

--output-version=""
    The preferred API versions of the output objects

--ports="80:80,443:443"
    A comma delimited list of ports or port pairs to expose on the router pod. The default is set for HAProxy. Port pairs are applied to the service and to host ports (if specified).

--replicas=1
    The replication factor of the router; commonly 2 when high availability is desired.

--secrets-as-env=false
    Use environment variables for master secrets.

--selector=""
    Selector used to filter nodes on deployment. Used to run routers on a specific set of nodes.

--service-account="router"
    Name of the service account to use to run the router pod.

--stats-password=""
    If the underlying router implementation can provide statistics this is the requested password for auth. If not set a password will be generated.

--stats-port=1936
    If the underlying router implementation can provide statistics this is a hint to expose it on this port. Specify 0 if you want to turn off exposing the statistics.

--stats-user="admin"
    If the underlying router implementation can provide statistics this is the requested username for auth.

--subdomain=""
    The template for the route subdomain exposed by this router, used for routes that are not externally specified. E.g. '${name}-${namespace}.apps.mycompany.com'

--type="haproxy-router"
    The type of router to use - if you specify --images this flag may be ignored.

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.

--certificate-authority=""
    Path to a cert. file for the certificate authority.

--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

EXAMPLE

      # Check the default router ("router")
      openshift cli adm router --dry-run
      # See what the router would look like if created
      openshift cli adm router -o yaml
      # Create a router with two replicas if it does not exist
      openshift cli adm router router-west --replicas=2
      # Use a different router image
      openshift cli adm router region-west --images=myrepo/somerouter:mytag
      # Run the router with a hint to the underlying implementation to _not_ expose statistics.
      openshift cli adm router router-west --stats-port=0

SEE ALSO

openshift-cli-adm(1),

HISTORY

June 2016, Ported from the Kubernetes man-doc generator