添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

hello I’m new to k3s, Kubernetes and rancher,
every time I install rancher I get the following error:
INSTALLATION FAILED: chart requires kubeVersion: < 1.26.0-0 which is incompatible with Kubernetes v1.26.4+k3s1

@J_McEvoy not sure how you installed k3s, but if via their script you need to specify the version via INSTALL_K3S_VERSION

For example

curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION={K3s version} sh -

Or Download direct at https://github.com/k3s-io/k3s/releases

Since your getting started you might want to check out All Products - Rancher Academy

@J_McEvoy I just did a quick install on openSUSE MicroOS (bare-metal) and all good, it’s just a single node so replicas are set to one (1);

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
helm version
version.BuildInfo{Version:"v3.11.3", GitCommit:"323249351482b3bbfc9f5004f65d400aa70f9ae7", GitTreeState:"clean", GoVersion:"go1.20.3"}
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION={v1.25.7+k3s1} INSTALL_K3S_EXEC="--node-external-ip=192.168.10.20" sh -
kubectl cluster-info
Kubernetes control plane is running at https://127.0.0.1:6443
CoreDNS is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/https:metrics-server:https/proxy
kubectl get nodes -o wide
NAME     STATUS   ROLES                  AGE    VERSION        INTERNAL-IP     EXTERNAL-IP     OS-IMAGE           KERNEL-VERSION     CONTAINER-RUNTIME
kermit   Ready    control-plane,master   2m4s   v1.25.7+k3s1   192.168.10.20   192.168.10.20   openSUSE MicroOS   6.2.12-1-default   containerd://1.6.15-k3s1
helm repo add jetstack https://charts.jetstack.io --force-update
"jetstack" has been added to your repositories
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest --force-update
"rancher-latest" has been added to your repositories
helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "jetstack" chart repository
...Successfully got an update from the "rancher-latest" chart repository
Update Complete. ⎈Happy Helming!⎈
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version=1.11.1 --set installCRDs=true
kubectl -n cert-manager rollout status deploy/cert-manager
deployment "cert-manager" successfully rolled out
kubectl -n cert-manager rollout status deploy/cert-manager-webhook
deployment "cert-manager-webhook" successfully rolled out
kubectl create namespace cattle-system
namespace/cattle-system created
helm install rancher rancher-latest/rancher --namespace cattle-system --set hostname=kermit.homelinux.org --set replicas=1 --version=2.7.3 --set bootstrapPassword=iamadmin --set global.cattle.psp.enabled=false
              

got this error:error: deployment “cert-manager-webhook” exceeded its progress deadline and this, see screenshot
Screenshot_101038×1031 114 KB

@J_McEvoy Hi what does the following show;

kubectl -n cert-manager rollout status deploy/cert-manager-webhook
kubectl get pods -o wide -n cert-manager

And you exported the config;

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
              

@J_McEvoy the order is important, you should only need to sudo for the install of helm and k3s (and check the service has started).

As your user export the KUBECONFIG, then run the kubectl commands…

@J_McEvoy ahh ok, so copy it to your working directory and check permissions;

cp /etc/rancher/k3s/k3s.yaml .
ls -la k3s.yaml
export KUBECONFIG=$(pwd)/k3s.yaml
              

@J_McEvoy not a problem, it’s all a learning process :wink:

So you need to use the chown command to set to user username and group, for example

chown jhmc93:users k3s.yaml

Assuming I got your username correct (I’m not sure what group your in…), run the command groups to see or just look at the username and group from the output of ls -la