Skip to content

Instantly share code, notes, and snippets.

@snormore
Last active February 16, 2023 09:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snormore/36eb05b675f399af6b18e960488440e4 to your computer and use it in GitHub Desktop.
Save snormore/36eb05b675f399af6b18e960488440e4 to your computer and use it in GitHub Desktop.
Golang with kind (Kubernetes-in-Docker) on CircleCI
version: 2
jobs:
build:
machine: true
steps:
- checkout
- run:
name: Install KinD
command: |
curl -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/0.0.1/kind-linux-amd64
chmod +x kind
sudo mv kind /usr/local/bin/
- run:
name: Create Kubernetes Cluster
command: |
kind create cluster
- run:
name: Install kubectl
command: |
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
- run:
name: Run Tests
command: |
export KUBECONFIG="$(kind get kubeconfig-path)"
kubectl cluster-info
kubectl get pods --all-namespaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment