Friday, July 14, 2017

openshift - oc cluster up in specific address



When you do 'oc cluster up' , you can access openshift console using 127.0.0.1.

But if you wish to specify IP address to access your openshift console make use of --public-hostname=<IP address>

This way you can access the  cluster even from outside (but within LAN ofcourse)


# oc cluster up --public-hostname=192.168.122.152

===============================================

Also, to retain configuration from previous run:

oc cluster up --host-data-dir=/mydata     --use-existing-config 

Where mydata is the directory created - ensure it has adequate permissions.


============================================

Also, you can ask for specific version like below:

oc cluster up  --public-hostname=10.70.43.54   --version=v3.9 --service-catalog 

=============

Another example (with all above combined):

oc cluster up 
--image=registry.access.redhat.com/openshift3/ose \
--version=v3.9 \
 --service-catalog=true \
 --routing-suffix=10.70.43.54.nip.io \
 --public-hostname=10.70.43.54.nip.io \
 --loglevel=2 \
 --host-data-dir=/mydata \
 --use-existing-config


Where, 10.70.43.54  is your node's IP address.

===============================================

No comments:

Post a Comment