Merge pull request #9326 from derekwaynecarr/openshift_update

Update OpenShift on Kubernetes example for getting service public ip
pull/6/head
Quinton Hoole 2015-06-05 14:57:59 -07:00
commit 8dd4ac0cb9
2 changed files with 4 additions and 6 deletions

View File

@ -75,7 +75,7 @@ build default certificates.
Grab the public IP address of the service we previously created.
```shell
$ export PUBLIC_IP=$(cluster/kubectl.sh get services openshift --template="{{ index .spec.publicIPs 0 }}")
$ export PUBLIC_IP=$(cluster/kubectl.sh get services openshift --template="{{ index .status.loadBalancer.ingress 0 \"ip\" }}")
$ echo $PUBLIC_IP
```

View File

@ -20,11 +20,9 @@ export OPENSHIFT_CONFIG=${OPENSHIFT_EXAMPLE}/config
mkdir ${OPENSHIFT_CONFIG}
cluster/kubectl.sh config view --output=yaml --flatten=true --minify=true > ${OPENSHIFT_CONFIG}/kubeconfig
cluster/kubectl.sh create -f $OPENSHIFT_EXAMPLE/openshift-service.yaml
sleep 30
export PUBLIC_IP=$(cluster/kubectl.sh get services openshift --template="{{ index .spec.publicIPs 0 }}")
echo $PUBLIC_IP
export SVC_IP=$(cluster/kubectl.sh get services openshift --template="{{ .spec.portalIP }}")
echo $SVC_IP
sleep 60
export PUBLIC_IP=$(cluster/kubectl.sh get services openshift --template="{{ index .status.loadBalancer.ingress 0 \"ip\" }}")
echo "PUBLIC IP: ${PUBLIC_IP}"
docker run --privileged -v ${OPENSHIFT_CONFIG}:/config openshift/origin start master --write-config=/config --kubeconfig=/config/kubeconfig --master=https://localhost:8443 --public-master=https://${PUBLIC_IP}:8443
sudo -E chown ${USER} -R ${OPENSHIFT_CONFIG}
docker run -i -t --privileged -e="OPENSHIFTCONFIG=/config/admin.kubeconfig" -v ${OPENSHIFT_CONFIG}:/config openshift/origin ex bundle-secret openshift-config -f /config &> ${OPENSHIFT_EXAMPLE}/secret.json