Skip to content

Commit 456cfaa

Browse files
committed
fix(gitlab-ci): update kind/kubectl, alias dind service to kubernetes
1 parent df54b8d commit 456cfaa

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

.gitlab-ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
image: docker:stable
22
variables:
3-
KUBECTL: v1.17.0
4-
KIND: v0.8.1
3+
KUBECTL: v1.25.1
4+
KIND: v0.15.0
55
services:
6-
- docker:dind
6+
- name: docker:dind
7+
alias: kubernetes
78
stages:
89
- test
910
test:
@@ -15,7 +16,7 @@ test:
1516
- wget -O /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL}/bin/linux/amd64/kubectl
1617
- chmod +x /usr/local/bin/kubectl
1718
- kind create cluster --config=./gitlab/kind-config.yaml
18-
- sed -i -E -e 's/localhost|0\.0\.0\.0/docker/g' "$HOME/.kube/config"
19+
- sed -i -E -e 's/localhost|0\.0\.0\.0/kubernetes/g' "$HOME/.kube/config"
1920
- kubectl get nodes -o wide
2021
- kubectl get pods --all-namespaces -o wide
2122
- kubectl get services --all-namespaces -o wide

gitlab/kind-config.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@ kind: Cluster
33
networking:
44
apiServerAddress: "0.0.0.0"
55

6-
# add to the apiServer certSANs the name of the docker (dind) service in order to be able to reach the cluster through it
7-
kubeadmConfigPatchesJSON6902:
8-
- group: kubeadm.k8s.io
9-
version: v1beta2
10-
kind: ClusterConfiguration
11-
patch: |
12-
- op: add
13-
path: /apiServer/certSANs/-
14-
value: docker
156
nodes:
167
- role: control-plane
178
- role: worker

0 commit comments

Comments
 (0)