diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index f218465a581..e9cbe0f0a5b 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -318,6 +318,14 @@ cleanup() exit 0 } +function warning { + message=$1 + + echo $(tput bold)$(tput setaf 1) + echo "WARNING: ${message}" + echo $(tput sgr0) +} + function start_etcd { echo "Starting etcd" kube::etcd::start @@ -727,7 +735,20 @@ if [[ "${START_MODE}" != "kubeletonly" ]]; then fi if [[ "${START_MODE}" != "nokubelet" ]]; then - start_kubelet + ## TODO remove this check if/when kubelet is supported on darwin + # Detect the OS name/arch and display appropriate error. + case "$(uname -s)" in + Darwin) + warning "kubelet is not currently supported in darwin, kubelet aborted." + KUBELET_LOG="" + ;; + Linux) + start_kubelet + ;; + *) + warning "Unsupported host OS. Must be Linux or Mac OS X, kubelet aborted." + ;; + esac fi if [[ -n "${PSP_ADMISSION}" && "${ENABLE_RBAC}" = true ]]; then @@ -739,3 +760,5 @@ print_success if [[ "${ENABLE_DAEMON}" = false ]]; then while true; do sleep 1; done fi + +