Saturday, September 10, 2022

Kubernestes Issues and Resolution

 Issues:

root@ip-172-31-35-19:~# kubectl get nodes

The connection to the server localhost:8080 was refused - did you specify the right host or port?


Solution:

sudo mkdir ~/.kube
sudo cp /etc/kubernetes/admin.conf ~/.kube/

cd ~/.kube

sudo mv admin.conf config
sudo service kubelet restart


Issue -2)
 Warning  FailedCreatePodSandBox  107s  kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "69236544076765f349399a9581bb6b8c5aa16a09f2d53f6fd0608d11f089c10e": error getting ClusterInformation: Get "https://10.96.0.1:443/apis/crd.projectcalico.org/v1/clusterinformations/default": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")


Solution:
root@ip-172-31-35-19:~/.kube# curl https://docs.projectcalico.org/manifests/calico-typha.yaml -o calico.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  233k  100  233k    0     0   970k      0 --:--:-- --:--:-- --:--:--  966k
root@ip-172-31-35-19:~/.kube# kubectl apply -f calico.yaml

No comments:

Post a Comment

Sample Game App Deployment on EKS cluster

 https://padmakshi.medium.com/setting-up-an-eks-cluster-and-deploying-a-game-application-a-step-by-step-guide-08790e0be117