[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Changes to OpenShift 3 startup commands



The OpenShift 3 start command has received some upgrades.  When you start an all-in-one with:

    $ openshift start

it will now bind to 0.0.0.0 as a default.  The Kubelet will attempt to contact the master over the first non-loopback IPv4 address it finds (if you specify no other arguments), which means that the OpenShift master will be visible to containers you are running.

If you want to start masters and nodes separately (or multiple nodes), you can now pass a separate argument to the start command as a role:

    # starts the API servers, the schedulers, etcd, and other background tasks
    $ openshift start master

    # starts the Kubelet and service proxy
    $ openshift start node

If you run this on the same system, the master and node will both be preconfigured to talk to each other via your system hostname - if your hostname does not resolve to an IP on your system, then the master won't be able to see the node.  `openshift start` saves you the effort of typing both commands.


### Running multiple nodes

Currently there is no dynamic registration mechanism for nodes in Kubernetes (coming very soon though!) - until that lands, when you want to run an OpenShift cluster you'll need to tell the master where all the nodes are up front:

    $ openshift start master --nodes=host1,host2,host3

On startup, the master will print how it can be reached (e.g. http://10.0.0.1:8080). On each host, run the following to join the cluster:

    $ openshift start node --master=http://10.0.0.1:8080

The --master flag tells OpenShift what address to use as the canonical address of the master, and you can use it to select which interface you want published to nodes (if you have multiple).  The --listenAddr flag has been renamed --listen and will control what address OpenShift tries to bind to on both masters and nodes.  For example:

    # tells the master to listen on 10.0.0.1 and use the DNS name "master.openshift.local" when referring to itself
    $ openshift start master --master=master.openshift.local:8080 --listen=10.0.0.1

    # start a node that connects to "master.openshift.local" and listens on all interfaces
    $ openshift start node --master=master.openshift.local --listen=0.0.0.0

Remember, the master must be able to reach the node (to get health information and info about running pods), and the node must be able to see the master on the etcd port 4001 (for now).


### Using an existing etcd server

Currently masters start etcd on port 4001.  If you would like to use an external etcd server, you can give the address of that server with --etcd:

    $ openshift start master --etcd=etcd.local
    $ openshift start node --etcd=etcd.local

Since in the near term etcd access from the nodes will be replaced with API calls to the master, you only need to specify --etcd from the nodes if etcd is not running on the same host as the master.

These changes are now in master but are not yet in a nightly binary release, which should be coming soon.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]