diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 24d0a3890e80..000000000000 --- a/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.* -* -!docker-entrypoint.sh -!k0s -!k0s-arm -!k0s-arm64 -!k0s-amd64 - diff --git a/examples/bootloose-ha-controllers/.gitignore b/examples/bootloose-ha-controllers/.gitignore deleted file mode 100644 index 1900c8ca2cee..000000000000 --- a/examples/bootloose-ha-controllers/.gitignore +++ /dev/null @@ -1 +0,0 @@ -footloose.yaml diff --git a/examples/bootloose-ha-controllers/Dockerfile b/examples/bootloose-ha-controllers/Dockerfile deleted file mode 100644 index 532ff2691a46..000000000000 --- a/examples/bootloose-ha-controllers/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM quay.io/k0sproject/bootloose-ubuntu18.04 - -ADD k0s.service /etc/systemd/system/k0s.service - -RUN curl --proto '=https' --tlsv1.2 --retry 5 --retry-all-errors -Lfo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.31.1/bin/linux/amd64/kubectl && \ - chmod +x /usr/local/bin/kubectl - -ENV KUBECONFIG=/var/lib/k0s/pki/admin.conf diff --git a/examples/bootloose-ha-controllers/Makefile b/examples/bootloose-ha-controllers/Makefile deleted file mode 100644 index a061230abbbe..000000000000 --- a/examples/bootloose-ha-controllers/Makefile +++ /dev/null @@ -1,15 +0,0 @@ - -.PHONY: build -build: - $(MAKE) -C ../../ build tmpdir=/tmp/k0s-build - -.PHONY: create-cluster -create-cluster: build - docker build --progress=plain -t k0s-bootloose . - envsubst < bootloose.yaml.tpl > bootloose.yaml - bootloose create - -.PHONY: delete-cluster -delete-cluster: - bootloose delete - docker volume prune -f diff --git a/examples/bootloose-ha-controllers/README.md b/examples/bootloose-ha-controllers/README.md deleted file mode 100644 index e237e26a6dac..000000000000 --- a/examples/bootloose-ha-controllers/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# k0s HA controllers with bootloose - -> This example is targeted for development use - -## Setup - -* Install [bootloose](https://github.com/k0sproject/bootloose) -* Start a cluster: `make create-cluster` -* Now you can exec into running nodes, for example: `bootloose ssh root@controller0` -* Within a node there is a config file (`/etc/k0s/config.yaml`) and systemd service (`k0s`) available for easier testing. - -## Teardown - -* Teardown a cluster: `make delete-cluster` diff --git a/examples/bootloose-ha-controllers/bootloose.yaml.tpl b/examples/bootloose-ha-controllers/bootloose.yaml.tpl deleted file mode 100644 index 2c049de59b2d..000000000000 --- a/examples/bootloose-ha-controllers/bootloose.yaml.tpl +++ /dev/null @@ -1,29 +0,0 @@ -cluster: - name: k0s - privateKey: ~/.ssh/id_rsa -machines: -- count: 3 - backend: docker - spec: - image: k0s-bootloose:latest - name: controller%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: bind - source: $PWD/../../k0s - destination: /usr/local/bin/k0s - - type: bind - source: $PWD/k0s.yaml - destination: /etc/k0s/config.yaml - - type: volume - destination: /var/lib/k0s - portMappings: - - containerPort: 22 - hostPort: 9222 - - containerPort: 6443 - hostPort: 6443 - - containerPort: 8080 - hostPort: 8080 diff --git a/examples/bootloose-ha-controllers/k0s.service b/examples/bootloose-ha-controllers/k0s.service deleted file mode 100644 index 7d8da20ac31a..000000000000 --- a/examples/bootloose-ha-controllers/k0s.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=k0s - -[Service] -ExecStart=/usr/local/bin/k0s server --config /etc/k0s/config.yaml - -[Install] -WantedBy=multi-user.target diff --git a/examples/bootloose-ha-controllers/k0s.yaml b/examples/bootloose-ha-controllers/k0s.yaml deleted file mode 100644 index f2528536941e..000000000000 --- a/examples/bootloose-ha-controllers/k0s.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: k0s.k0sproject.io/v1beta1 -kind: ClusterConfig -metadata: - name: k0s-etcd -spec: - storage: - type: etcd - # etcd: - # peerAddress: "" diff --git a/examples/bootloose-mysql/README.md b/examples/bootloose-mysql/README.md deleted file mode 100644 index 8256ec567c9a..000000000000 --- a/examples/bootloose-mysql/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# k0s in bootloose with mysql - -In this example we're gonna use bootloose to simulate 2-node control plane setup using mysql as the storage. - -**Note:** All the config files are more like examples, you WILL need to finetune them to fit your env. - -## Prep work - -1. Install docker -2. Get bootloose from https://github.com/k0sproject/bootloose -3. Build k0s bin: Run `make build` at repo root - -## Mysql - -Let's run mysql in docker: - -```shell -docker run --name k0s-mysql -p 3306:3306 -e MYSQL_DATABASE=k0s -e MYSQL_ROOT_PASSWORD=k0srocks -d mysql:latest -``` - -Let's see which IP address docker gave the container: - -```shell - docker inspect -f {{.NetworkSettings.Networks.bridge.IPAddress}} k0s-mysql -``` - -Fix the mysql address in `k0s.yaml` config file. - -## k0s control plane - -First we need to bootup the control plane nodes: - -```shell -bootloose create -``` - -This will start two nodes for us: `controller0` and `controller1`. There's a bind-mount of the whole repo so we easily get the compiled bin into the nodes. - -### Controller0 - -`controller0` will be our "primary" controller node so let's bootstrap it first. - -SSH into the node with: - -```shell -bootloose ssh root@controller0 -``` - -Bootstrap the controlplane: - -```shell -cd /root/k0s -./k0s controller -``` - -Yes, really. It's that easy. In less than a minute we'll have the control plane up-and-running. - -### Get the join token for second controller - -To be able to join a second controller into the cluster we'll need a "join token". In `controller0` run a command: - -```shell -k0s token create --role controller -``` - -This will output the token we'll need in the next step. - -### Join controller1 into control plane - -SSH into the node with: - -```shell -bootloose ssh root@controller1 -``` - -Bootstrap the controlplane: - -```shell -cd /root/k0s -./k0s controller --join-address https://:9443 "that_long_token" -``` - -And voilĂ , our second controller node is up-and-running in no time. diff --git a/examples/bootloose-mysql/bootloose.yaml b/examples/bootloose-mysql/bootloose.yaml deleted file mode 100644 index 87dc6ad89529..000000000000 --- a/examples/bootloose-mysql/bootloose.yaml +++ /dev/null @@ -1,26 +0,0 @@ -cluster: - name: k0s - privateKey: ~/.ssh/id_rsa -machines: -- count: 2 - backend: docker - spec: - image: quay.io/k0sproject/bootloose-ubuntu18.04 - name: controller%d - privileged: true - volumes: - - type: bind - source: /lib/modules - destination: /lib/modules - - type: bind - source: /home/jussi/go/src/github.com/k0sproject/k0s - destination: /root/k0s - - type: volume - destination: /var/lib/k0s - portMappings: - - containerPort: 22 - hostPort: 9222 - - containerPort: 6443 - hostPort: 6443 - - containerPort: 8080 - hostPort: 8080 diff --git a/examples/bootloose-mysql/k0s.yaml b/examples/bootloose-mysql/k0s.yaml deleted file mode 100644 index 0d9652e07ce6..000000000000 --- a/examples/bootloose-mysql/k0s.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: k0s.k0sproject.io/v1beta1 -kind: ClusterConfig -metadata: - name: foobar -spec: - storage: - type: kine - kine: - dataSource: mysql://root:kine@tcp(172.17.0.4)/kine - api: - address: 172.17.0.2 # Address where the k8s API is accessed at (nodes public IP or LB) -