0

I was attempting to run a hello-world demo of Krustlet on minikube following the Krustlet's official tutorial.

julen@julen-HP-ZBook:~/Cloudlab/krustlet$ minikube start --driver=virtualbox
  minikube v1.29.0 on Ubuntu 22.04
✨  Using the virtualbox driver based on user configuration
  Starting control plane node minikube in cluster minikube
  Creating virtualbox VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
  Preparing Kubernetes v1.26.1 on Docker 20.10.23 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
  Configuring bridge CNI (Container Networking Interface) ...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
  Verifying Kubernetes components...
  Enabled addons: storage-provisioner, default-storageclass
  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
julen@julen-HP-ZBook:~/Cloudlab/krustlet$ kubectl get nodes
NAME       STATUS   ROLES           AGE   VERSION
minikube   Ready    control-plane   83s   v1.26.1
julen@julen-HP-ZBook:~/Cloudlab/krustlet$ curl https://raw.githubusercontent.com/krustlet/krustlet/main/scripts/bootstrap.sh | /bin/bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: raw.githubusercontent.com
julen@julen-HP-ZBook:~/Cloudlab/krustlet$ bash <(curl https://raw.githubusercontent.com/krustlet/krustlet/main/scripts/bootstrap.sh)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2456  100  2456    0     0   5652      0 --:--:-- --:--:-- --:--:--  5645
secret/bootstrap-token-5k3c0g created
Switched to context "minikube".
Context "minikube" renamed to "tls-bootstrap-token-user@kubernetes".
User "tls-bootstrap-token-user" set.
Context "tls-bootstrap-token-user@kubernetes" modified.
Context "tls-bootstrap-token-user@kubernetes" modified.
julen@julen-HP-ZBook:~/Cloudlab/krustlet$ KUBECONFIG=~/.krustlet/config/kubeconfig \
  krustlet-wasi \
  --node-ip 10.0.2.2 \
  --node-name=krustlet \
  --bootstrap-file=${HOME}/.krustlet/config/bootstrap.conf
Mar 24 17:04:26.750 ERROR kube::client: failed with error error trying to connect: tcp connect error: Connection refused (os error 111)
Error: HyperError: error trying to connect: tcp connect error: Connection refused (os error 111)

Caused by:
    0: error trying to connect: tcp connect error: Connection refused (os error 111)
    1: tcp connect error: Connection refused (os error 111)
    2: Connection refused (os error 111)

I have tried with ip 10.0.2.2 as indicated in the documentation. I have also followed the steps indicated in case this ip has changed. None of the IPs work for me.

I have also tried following this tutorial with Kind. It didn't work either.

julen@julen-HP-ZBook:~/Cloudlab/krustlet$ kind create cluster
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.20.2) 
 ✓ Preparing nodes   
 ✓ Writing configuration  
 ✓ Starting control-plane ️ 
 ✓ Installing CNI  
 ✓ Installing StorageClass  
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Have a nice day! 
julen@julen-HP-ZBook:~/Cloudlab/krustlet$ curl https://raw.githubusercontent.com/krustlet/krustlet/main/scripts/bootstrap.sh | /bin/bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2456  100  2456    0     0   6854      0 --:--:-- --:--:-- --:--:--  6860
secret/bootstrap-token-p83li5 created
Switched to context "kind-kind".
Context "kind-kind" renamed to "tls-bootstrap-token-user@kubernetes".
User "tls-bootstrap-token-user" set.
Context "tls-bootstrap-token-user@kubernetes" modified.
Context "tls-bootstrap-token-user@kubernetes" modified.
julen@julen-HP-ZBook:~/Cloudlab/krustlet$ KUBECONFIG=~/.krustlet/config/kubeconfig \
  krustlet-wasi \
  --node-ip=172.17.0.1 \
  --node-name=krustlet \
  --bootstrap-file=${HOME}/.krustlet/config/bootstrap.conf
Mar 24 17:13:36.504 ERROR kube::client: failed with error error trying to connect: tcp connect error: Connection refused (os error 111)
Error: HyperError: error trying to connect: tcp connect error: Connection refused (os error 111)

Caused by:
    0: error trying to connect: tcp connect error: Connection refused (os error 111)
    1: tcp connect error: Connection refused (os error 111)
    2: Connection refused (os error 111)
julen@julen-HP-ZBook:~/Cloudlab/krustlet$ kubectl get nodes
NAME                 STATUS     ROLES                  AGE   VERSION
kind-control-plane   NotReady   control-plane,master   37s   v1.20.2
julen@julen-HP-ZBook:~/Cloudlab/krustlet$ 

julenbhy
  • 1
  • 1

1 Answers1

0

I managed to solve the problem by deleting the ~/.krustlet directory before running the script for regenerating the ~/.krustlet/config/bootstrap.conf file.

julenbhy
  • 1
  • 1