Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minikube status is broken #2743

Closed
PI-Victor opened this issue Apr 18, 2018 · 7 comments
Closed

minikube status is broken #2743

PI-Victor opened this issue Apr 18, 2018 · 7 comments

Comments

@PI-Victor
Copy link
Member

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

Please provide the following details:

Environment:
MacOS
Minikube version (use minikube version):
minikube version: v0.26.0

  • OS
    System Version: macOS 10.13.3 (17D102)
    Kernel Version: Darwin 17.4.0
  • VM Driver hyperkit
  • ISO version Boot2DockerURL": ~/.minikube/cache/iso/minikube-v0.26.0.iso

What happened:
minikube status is is broken

 ~/.minikube: minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.64.34
 ~/.minikube: minikube status
E0418 09:53:35.972462   26020 status.go:85] Error cluster status: Error: Unrecognized output from ClusterStatus: Running
~/.minikube: minikube status
E0418 09:53:39.347545   26049 status.go:85] Error cluster status: Error: Unrecognized output from ClusterStatus: Running
DEHER1M1971 ~/.minikube

What you expected to happen:

minikube status outputs its proper status

How to reproduce it (as minimally and precisely as possible):

minikube status

Output of minikube logs (if applicable):

Anything else do we need to know:

I did some debugging and this is caused because this check - mostly returns an empty string.

@OlafSzmidt
Copy link

Bump. Seeing this too.

@numbsafari
Copy link

Seems to only happen intermittently for me. Also on minikube v0.26.0.

@numbsafari
Copy link

I can confirm this also happens with v0.27.0 on MacOS.

@ivanbrennan
Copy link

I'm seeing in minikube v0.26.0 on NixOS too.

ivanbrennan added a commit to ivanbrennan/nixbox that referenced this issue May 27, 2018
Set the default kubernetes version in minikube:

  minikube config set kubernetes-version v1.10.3

Configure clusters and credentials:

  PKI=$HOME/Development/code/SumAll/pki
  CLUSTERS=( tng-stage tng-prod )
  USERNAME=ibrennan

  mkdir -p $PKI

  for CLUSTER in ${CLUSTERS[@]}; do
    CRT=${PKI}/${CLUSTER}-ca.crt
    lpass show --notes "SumAll kubernetes ${CLUSTER} client ca.crt" > $CRT

    LPASS=$(lpass show --notes "SumAll kubernetes ${CLUSTER} client config ${USERNAME}")
    SERVER=$(grep -oP '^server: \K\S+' <<< $LPASS)
    TOKEN=$(grep -oP '^token: \K\S+' <<< $LPASS)

    kubectl config set-cluster ${CLUSTER} --server=${SERVER} --certificate-authority=${CRT} --embed-certs=true
    kubectl config set-credentials ${USERNAME}-${CLUSTER} --token=${TOKEN}
    kubectl config set-context ${CLUSTER} --cluster=${CLUSTER} --user=${USERNAME}-${CLUSTER}
  done

  unset PKI CLUSTERS CLUSTER USERNAME CRT LPASS SERVER TOKEN

Initialize cluster resources:

  RESOURCES=$HOME/Development/code/SumAll/k8s-cluster-resources
  if [ ! -e $RESOURCES ]; then
    git clone git@github.com:SumAll/k8s-cluster-resources.git $RESOURCES
  fi
  kubectl --context=minikube create -f $RESOURCES/ms-config-dev.yml
  kubectl --context=minikube create -f $RESOURCES/k8s-generic-pod-user-dev.yml
  kubectl --context=minikube create -f $RESOURCES/mongo/mongo-dev.yml
  kubectl --context=minikube create -f $RESOURCES/redis/redis-dev.yml
  kubectl --context=minikube create -f $RESOURCES/site-proxy/ingress-dev.yaml
  unset RESOURCES

  minikube service mongo --url
  minikube service redis --url

Set up tng-workspace:

  if ! systemctl --quiet is-active openvpn-sumall.service; then
    systemctl start openvpn-sumall.service
  fi

  # minikube status is broken: kubernetes/minikube#2743
  ps x | grep -q [m]inikube || minikube start

  WORKSPACE=$HOME/Development/code/SumAll/k8s-workspace
  if [ ! -e $WORKSPACE ]; then
    git clone git@github.com:SumAll/k8s-workspace.git $WORKSPACE
  fi
  pushd $WORKSPACE >/dev/null

  export TNG_WORKSPACE=$HOME/Development/code/SumAll/tng-workspace
  mkdir -p $TNG_WORKSPACE

  for f in config.sh manage-services.sh setup-serviceyml-configmap.sh; do
    sed -i '1 s,#!/bin/bash,#!/usr/bin/env bash,' $f
  done

  ./manage-services.sh -c setup

  for f in config.sh manage-services.sh setup-serviceyml-configmap.sh; do
    sed -i '1 s,#!/usr/bin/env bash,#!/bin/bash,' $f
  done

  popd
  unset WORKSPACE f
ivanbrennan added a commit to ivanbrennan/nixbox that referenced this issue May 27, 2018
Set the default kubernetes version in minikube:

  minikube config set kubernetes-version v1.10.3

Configure clusters and credentials:

  PKI=$HOME/Development/code/SumAll/pki
  CLUSTERS=( tng-stage tng-prod )
  USERNAME=ibrennan

  mkdir -p $PKI

  for CLUSTER in ${CLUSTERS[@]}; do
    CRT=${PKI}/${CLUSTER}-ca.crt
    lpass show --notes "SumAll kubernetes ${CLUSTER} client ca.crt" > $CRT

    LPASS=$(lpass show --notes "SumAll kubernetes ${CLUSTER} client config ${USERNAME}")
    SERVER=$(grep -oP '^server: \K\S+' <<< $LPASS)
    TOKEN=$(grep -oP '^token: \K\S+' <<< $LPASS)

    kubectl config set-cluster ${CLUSTER} --server=${SERVER} --certificate-authority=${CRT} --embed-certs=true
    kubectl config set-credentials ${USERNAME}-${CLUSTER} --token=${TOKEN}
    kubectl config set-context ${CLUSTER} --cluster=${CLUSTER} --user=${USERNAME}-${CLUSTER}
  done

  unset PKI CLUSTERS CLUSTER USERNAME CRT LPASS SERVER TOKEN

Initialize cluster resources:

  RESOURCES=$HOME/Development/code/SumAll/k8s-cluster-resources
  if [ ! -e $RESOURCES ]; then
    git clone git@github.com:SumAll/k8s-cluster-resources.git $RESOURCES
  fi
  kubectl --context=minikube create -f $RESOURCES/ms-config-dev.yml
  kubectl --context=minikube create -f $RESOURCES/k8s-generic-pod-user-dev.yml
  kubectl --context=minikube create -f $RESOURCES/mongo/mongo-dev.yml
  kubectl --context=minikube create -f $RESOURCES/redis/redis-dev.yml
  kubectl --context=minikube create -f $RESOURCES/site-proxy/ingress-dev.yaml
  unset RESOURCES

  minikube service mongo --url
  minikube service redis --url

Set up tng-workspace:

  if ! systemctl --quiet is-active openvpn-sumall.service; then
    systemctl start openvpn-sumall.service
  fi

  # `minikube status` is broken: kubernetes/minikube#2743
  # `minikube start` is not idempotent: kubernetes/minikube#2646
  ps x | grep -q [m]inikube || minikube start

  WORKSPACE=$HOME/Development/code/SumAll/k8s-workspace
  if [ ! -e $WORKSPACE ]; then
    git clone git@github.com:SumAll/k8s-workspace.git $WORKSPACE
  fi
  pushd $WORKSPACE >/dev/null

  export TNG_WORKSPACE=$HOME/Development/code/SumAll/tng-workspace
  mkdir -p $TNG_WORKSPACE

  for f in config.sh manage-services.sh setup-serviceyml-configmap.sh; do
    sed -i '1 s,#!/bin/bash,#!/usr/bin/env bash,' $f
  done

  ./manage-services.sh -c setup

  for f in config.sh manage-services.sh setup-serviceyml-configmap.sh; do
    sed -i '1 s,#!/usr/bin/env bash,#!/bin/bash,' $f
  done

  popd
  unset WORKSPACE f
@Goorzhel
Copy link

Goorzhel commented Jun 2, 2018

v0.27.0, Void Linux. I use that distro to avoid systemd, on which the line referenced by OP relies.

@undermink
Copy link

Seeing this on gentoo, too. (minikube version: v0.27.0, openrc instead of systemd)

@aaron-prindle
Copy link
Contributor

fixed with #2894, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants