hisosic

[K8S] 설치할때 발생하는 에러 및 해결 방법 본문

Container/Kubernetes

[K8S] 설치할때 발생하는 에러 및 해결 방법

hisosic 2022. 8. 3. 10:37

kubeadm init  시 getting status of runtime: rpc error 발생

[root@k8s-master ~]$ kubeadm init --pod-network-cidr=10.200.0.0/16 --apiserver-advertise-address=20.20.6.102
[init] Using Kubernetes version: v1.24.3
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: E0803 01:18:36.955573    8592 remote_runtime.go:925] "Status from runtime service failed" err="rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService"
time="2022-08-03T01:18:36Z" level=fatal msg="getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService"
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher

해결 1

[root@k8s-master ~]$ rm /etc/containerd/config.toml
rm: remove regular file ‘/etc/containerd/config.toml’? y
[root@k8s-master ~]$ systemctl restart containerd
[root@k8s-master ~]$ kubeadm init --pod-network-cidr=10.200.0.0/16 --apiserver-advertise-address=20.20.6.102 --ignore-preflight-errors Swap --v=5

 


helm install 시 invalid apiVersion 에러 발생

[root@k8s-master ~]$ helm install kube-ops-view stable/kube-ops-view --set service.type=LoadBalancer --set rbac.create=True
WARNING: This chart is deprecated
Error: INSTALLATION FAILED: Kubernetes cluster unreachable: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"

해결 1

[root@k8s-master ~]$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
[root@k8s-master ~]$ chmod 700 get_helm.sh
[root@k8s-master ~]$ DESIRED_VERSION=v3.8.2 bash get_helm.sh

[root@k8s-master ~]$ helm upgrade --install -n **** **** ./K8s/****_chart --set ****

해결 2

curl -L https://git.io/get_helm.sh | bash -s -- --version v3.8.2

 

 


kubectl apply -f v2_4_1_full.yaml 실행 시 에러 발생

[root@k8s-master ~]$ kubectl apply -f v2_4_1_full.yaml
customresourcedefinition.apiextensions.k8s.io/ingressclassparams.elbv2.k8s.aws created
customresourcedefinition.apiextensions.k8s.io/targetgroupbindings.elbv2.k8s.aws created
role.rbac.authorization.k8s.io/aws-load-balancer-controller-leader-election-role created
clusterrole.rbac.authorization.k8s.io/aws-load-balancer-controller-role created
rolebinding.rbac.authorization.k8s.io/aws-load-balancer-controller-leader-election-rolebinding created
clusterrolebinding.rbac.authorization.k8s.io/aws-load-balancer-controller-rolebinding created
service/aws-load-balancer-webhook-service created
deployment.apps/aws-load-balancer-controller created
certificate.cert-manager.io/aws-load-balancer-serving-cert created
issuer.cert-manager.io/aws-load-balancer-selfsigned-issuer created
mutatingwebhookconfiguration.admissionregistration.k8s.io/aws-load-balancer-webhook created
validatingwebhookconfiguration.admissionregistration.k8s.io/aws-load-balancer-webhook created
ingressclass.networking.k8s.io/alb created
error: unable to recognize "v2_4_1_full.yaml": no matches for kind "IngressClassParams" in version "elbv2.k8s.aws/v1beta1"

 

해결

[root@k8s master ~]$ kubectl apply -k "github.com/aws/eks-charts/stable/aws-load-balancer-controller/crds?ref=master"

[root@k8s master ~]$ kubectl apply -f v2_4_1_full.yaml

 

Comments