#!/bin/bash

RUN_DIR=/var/vcap/sys/run/apiserver
PIDFILE=$RUN_DIR/apiserver.pid
JOB_DIR=/var/vcap/jobs/apiserver

source /var/vcap/packages/common/utils.sh

case $1 in

  start)
    pid_guard $PIDFILE "apiserver"

    mkdir -p $RUN_DIR
    chown -R vcap:vcap $RUN_DIR

    echo $$ > $PIDFILE

    exec chpst -u vcap:vcap /var/vcap/packages/kubernetes/kube-apiserver \
--address=0.0.0.0 \
--portal_net=10.247.0.0/16 \
--port=8080 \
--etcd_servers=http://127.0.0.1:4001 \
--logtostderr=true
    ;;

  stop)
    kill_and_wait $PIDFILE

    ;;

  *)
    echo "Usage: apiserver_ctl {start|stop}"

    ;;

esac

#!/bin/bash

RUN_DIR=/var/vcap/sys/run/apiserver
PIDFILE=$RUN_DIR/apiserver.pid
JOB_DIR=/var/vcap/jobs/apiserver

source /var/vcap/packages/common/utils.sh

case $1 in

  start)
    pid_guard $PIDFILE "apiserver"

    mkdir -p $RUN_DIR
    chown -R vcap:vcap $RUN_DIR

    echo $$ > $PIDFILE

    exec chpst -u vcap:vcap /var/vcap/packages/kubernetes/kube-apiserver \
--address=0.0.0.0 \
--portal_net=10.100.0.0/16 \
--port=8080 \
--etcd_servers=http://127.0.0.1:4001 \
--logtostderr=true
    ;;

  stop)
    kill_and_wait $PIDFILE

    ;;

  *)
    echo "Usage: apiserver_ctl {start|stop}"

    ;;

esac

Change apiserver portal_net to 10.100.0.0/16
Change apiserver portal_net to 10.100.0.0/16
