labring / sealos

Sealos is a production-ready Kubernetes distribution. You can run any Docker image on sealos, start high availability databases like mysql/pgsql/redis/mongo, develop applications using any Programming language.
https://cloud.sealos.io
Apache License 2.0
14.1k stars 2.08k forks source link

BUG: error when install k8s on centos7.9 error: resource mapping not found for name: "tigera-operator" namespace: "" from "manifests/tigera-operator.yaml": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1" #1775

Closed a1576471428 closed 2 years ago

a1576471428 commented 2 years ago

Which command or component

sealos run labring/kubernetes:v1.25.0 labring/calico:v3.22.1 --single

The Description of the bug

when install, report error: resource mapping not found for name: "tigera-operator" namespace: "" from "manifests/tigera-operator.yaml": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"

How to reproduce(pictures can be attached if necessary)

command:
sealos run labring/kubernetes:v1.25.0 labring/calico:v3.22.1 --single log:
2022-09-21T08:43:08 info Start to create a new cluster: master [10.0.2.15], worker [] 2022-09-21T08:43:08 info Executing pipeline Check in CreateProcessor. 2022-09-21T08:43:08 info checker:hostname [10.0.2.15:22] 2022-09-21T08:43:08 info checker:timeSync [10.0.2.15:22] 2022-09-21T08:43:08 info Executing pipeline PreProcess in CreateProcessor. 60d759ef12b047369834a3f89757a41699a27dc92b785772e6b64d03d8f38d5b 29516dc98b4b2d4fc899c9b27dfd004e75ee73ef9071ad6835f9ff97f156f58c default-1wsi4pnp default-n4wu3sse 2022-09-21T08:43:08 info Executing pipeline RunConfig in CreateProcessor. 2022-09-21T08:43:08 info Executing pipeline MountRootfs in CreateProcessor. which: no docker in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin) INFO [2022-09-21 08:43:53] >> check root,port,cri success Created symlink from /etc/systemd/system/multi-user.target.wants/containerd.service to /etc/systemd/system/containerd.service. INFO [2022-09-21 08:43:59] >> Health check containerd! INFO [2022-09-21 08:44:00] >> containerd is running INFO [2022-09-21 08:44:00] >> init containerd success Created symlink from /etc/systemd/system/multi-user.target.wants/image-cri-shim.service to /etc/systemd/system/image-cri-shim.service. INFO [2022-09-21 08:44:00] >> Health check image-cri-shim! INFO [2022-09-21 08:44:00] >> image-cri-shim is running INFO [2022-09-21 08:44:00] >> init shim success

Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config

Alternatively, if you are the root user, you can run:

export KUBECONFIG=/etc/kubernetes/admin.conf

You should now deploy a pod network to the cluster. Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at: https://kubernetes.io/docs/concepts/cluster-administration/addons/

You can now join any number of control-plane nodes by copying certificate authorities and service account keys on each node and then running the following as root:

kubeadm join apiserver.cluster.local:6443 --token \ --discovery-token-ca-cert-hash sha256:9ce671613b4c7583a69ea40e849c9a4d492b597ee724b95b902247587c80670d \ --control-plane --certificate-key

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join apiserver.cluster.local:6443 --token \ --discovery-token-ca-cert-hash sha256:9ce671613b4c7583a69ea40e849c9a4d492b597ee724b95b902247587c80670d 2022-09-21T08:45:28 info Executing pipeline Join in CreateProcessor. 2022-09-21T08:45:28 info start to get kubernetes token... 2022-09-21T08:45:31 info Executing pipeline RunGuest in CreateProcessor. 2022-09-21T08:45:31 info guest cmd is kubectl apply -f manifests/tigera-operator.yaml customresourcedefinition.apiextensions.k8s.io/bgpconfigurations.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/bgppeers.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/blockaffinities.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/caliconodestatuses.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/clusterinformations.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/felixconfigurations.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/globalnetworkpolicies.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/globalnetworksets.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/hostendpoints.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/ipamblocks.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/ipamconfigs.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/ipamhandles.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/ippools.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/ipreservations.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/kubecontrollersconfigurations.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/networkpolicies.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/networksets.crd.projectcalico.org created customresourcedefinition.apiextensions.k8s.io/apiservers.operator.tigera.io created customresourcedefinition.apiextensions.k8s.io/imagesets.operator.tigera.io created customresourcedefinition.apiextensions.k8s.io/installations.operator.tigera.io created customresourcedefinition.apiextensions.k8s.io/tigerastatuses.operator.tigera.io created namespace/tigera-operator created serviceaccount/tigera-operator created clusterrole.rbac.authorization.k8s.io/tigera-operator created clusterrolebinding.rbac.authorization.k8s.io/tigera-operator created deployment.apps/tigera-operator created error: resource mapping not found for name: "tigera-operator" namespace: "" from "manifests/tigera-operator.yaml": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1" ensure CRDs are installed first 2022-09-21T08:45:35 error Applied to cluster error: exit status 1 2022-09-21T08:45:35 info


 /\  \         /\  \         /\  \         /\__\     /\  \         /\  \
/::\  \       /::\  \       /::\  \       /:/  /    /::\  \       /::\  \

/:/\ \ \ /:/\:\ \ /:/\:\ \ /:/ / /:/\:\ \ /:/\ \ \ \:\~\ \ \ /::\~\:\ \ /::\~\:\ \ /:/ / /:/ \:\ \ \:\~\ \ \ /\ \:\ \ _\ /:/\:\ \:_\ /:/\:\ \:_\ /:// /:// \:_\ /\ \:\ \ _\ \:\ \:\ \// \:\~\:\ \// \/\:\/:/ / \:\ \ \:\ \ /:/ / \:\ \:\ \// \:\ \:_\ \:\ \:_\ \::/ / \:\ \ \:\ /:/ / \:\ \:_\ \:\/:/ / \:\ \// /:/ / \:\ \ \:\/:/ / \:\/:/ / \::/ / \:\\ /:/ / \:__\ \::/ / \::/ / \// \// \// \// \// \//

              Website :https://www.sealos.io/
              Address :github.com/labring/sealos

What you expected to happen

install success

Operating environment

fanux commented 2 years ago

kubernetes 1.25 not support PSP we will upgrade calico image.

cuisongliu commented 2 years ago

using v3.24.1 calico