Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Appveyor file which runs minikube for testing Kubernetes
image: ubuntu
build_script:
# Download ans install minikube
# Download kubectl, which is a requirement for using minikube
- curl -sL https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o kubectl
- chmod +x kubectl
- sudo mv kubectl /usr/local/bin/
# Download minikube
- curl -sL https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 -o minikube
- chmod +x minikube
- sudo mv minikube /usr/local/bin/
- sudo CHANGE_MINIKUBE_NONE_USER=true minikube start --vm-driver=none --memory=4096
# Wait for Kubernetes to be up and ready (https://blog.travis-ci.com/2017-10-26-running-kubernetes-on-travis-ci-with-minikube)
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done
# Run commands
- kubectl get nodes
- kubectl get pods --all-namespaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.