forked from kind-ci/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
23 lines (23 loc) · 884 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
image: docker:stable
variables:
KUBECTL: v1.15.0
KIND: v0.4.0
services:
- docker:dind
stages:
- test
test:
stage: test
script:
- apk add -U wget
- wget -O /usr/local/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND}/kind-linux-amd64
- chmod +x /usr/local/bin/kind
- wget -O /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL}/bin/linux/amd64/kubectl
- chmod +x /usr/local/bin/kubectl
- kind create cluster --config=./gitlab/kind-config.yaml
- sed -i -E -e 's/localhost|0\.0\.0\.0/docker/g' "$(kind get kubeconfig-path --name="kind")"
- export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
- kind get kubeconfig-path --name="kind"
- kubectl get nodes -o wide
- kubectl get pods --all-namespaces -o wide
- kubectl get services --all-namespaces -o wide