Skip to content

Commit fba8139

Browse files
committed
CLEANUP/MINOR: k0s: update k0s setting k8s cluster
1 parent d94bbbb commit fba8139

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

ci/k0s/k0s.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ apiVersion: k0s.k0sproject.io/v1beta1
22
kind: ClusterConfig
33
spec:
44
api:
5-
address: 172.21.0.2
5+
address: 172.210.0.2
66
network:
77
provider: kuberouter

ci/k0s/start-k0s.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ SCRIPT_DIR=$(dirname "$0")
1010
# docker network rm k0s-net &>/dev/null || true
1111

1212
# Create a network
13-
docker network create --subnet=172.21.0.0/24 k0s-net
13+
docker network create --subnet=172.210.0.0/24 k0s-net
1414

1515
# Start the controller
16-
docker run -d --name k0s-hug-controller --hostname k0s-hug-controller --privileged --ip 172.21.0.2 -v /var/lib/k0s -v /var/log/pods -v "$SCRIPT_DIR/k0s.yaml:/etc/k0s/k0s.yaml" -p 8443:6443 --net k0s-net docker.io/k0sproject/k0s:v1.34.1-k0s.0 k0s controller --single --config /etc/k0s/k0s.yaml
16+
docker run -d --name k0s-hug-controller --hostname k0s-hug-controller --privileged --ip 172.210.0.2 -v /var/lib/k0s -v /var/log/pods -v "$SCRIPT_DIR/k0s.yaml:/etc/k0s/k0s.yaml" -p 8443:6443 --net k0s-net docker.io/k0sproject/k0s:v1.34.1-k0s.0 k0s controller --single --config /etc/k0s/k0s.yaml
1717

1818
# Wait for the controller to be ready
1919
echo -n "Waiting for controller to be ready "

ci/k0s/stop-k0s.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ docker network rm k0s-net &>/dev/null || true
1212

1313
echo "Cleaning up kubeconfig..."
1414
# Unset current context if it's k0s, then delete the context, user and cluster
15-
if [ "$(kubectl config current-context 2>/dev/null)" == "k0s" ]; then
16-
kubectl config unset current-context &>/dev/null || true
15+
if [ "$(kubectl config current-context 2>/dev/null)" = "k0s" ]; then
16+
kubectl config unset current-context &>/dev/null || true
1717
fi
1818
kubectl config delete-context k0s &>/dev/null || true
1919
kubectl config delete-user k0s-user &>/dev/null || true

taskfile/k0s.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ tasks:
179179
- task: delimiter
180180
- echo "deploying echo service ..."
181181
- /{{.kubectl}} apply -f {{.CONFIG_DIR}}/echo/echo.yaml
182-
- /{{.kind}} load docker-image haproxytech/haproxy-unified-gateway:latest --name={{.CLUSTER_NAME}}
183182
- task: delimiter
184183
- /{{.kubectl}} wait --for=condition=ready --timeout=20s pod -l run=haproxy-unified-gateway -n haproxy-unified-gateway
185184
- kubectl get pods -A

0 commit comments

Comments
 (0)