2

Hi I was just trying to install argo CD in my local machine. I have installed and running minikube.

After creating argocd namespace, I just try these commands

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

This error persists:

Unable to connect to the server: dial tcp [2405:200:1607:2820:41::36]:443: i/o timeout

Could I get some help? Byw I'm new to argo...

perarasan
  • 21
  • 3

2 Answers2

1

Play with argocd in the killercoda playground. This is probably the easiest way to get started learning and messing around with it. https://killercoda.com/mabusaa/course/argocd-endusers-scenarios/00-argocd-playground

Or follow a guide like this: https://dev.to/abhinavd26/all-about-argocd-a-beginners-guide-33c9

Make sure your endpoints and services are up and you can curl the endpoint. Make sure to read the sections about ingresses and where to curl or connect to.

You may also need to ensure your network is set up properly to allow you to access the endpoint.

Here is a quick example from running the killercoda example...

$ kubectl create namespace argocd
namespace/argocd created

$ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io created
...
networkpolicy.networking.k8s.io/argocd-server-network-policy created

Look for the argocd-server pod to be running (bottom one)

$ kubectl get pods --namespace argocd
NAME                                                READY   STATUS    RESTARTS   AGE
argocd-application-controller-0                     1/1     Running   0          55s
argocd-applicationset-controller-84c8d6fc9b-nstm5   1/1     Running   0          55s
argocd-dex-server-59dc6fc75b-d8pnz                  1/1     Running   0          55s
argocd-notifications-controller-5d7dd8c5b7-j2hb4    1/1     Running   0          55s
argocd-redis-74cb89f466-52d22                       1/1     Running   0          55s
argocd-repo-server-c456f6997-4qcww                  1/1     Running   0          55s
argocd-server-7555f5c778-fx2s5                      1/1     Running   0          55s

Look at the endpoints - note the argocd-server endpoint on 192.168.1.21:8080

$ kubectl --namespace argocd get endpoints
NAME                                      ENDPOINTS                                               AGE
argocd-applicationset-controller          192.168.1.18:8080,192.168.1.18:7000                     85s
argocd-dex-server                         192.168.1.20:5558,192.168.1.20:5557,192.168.1.20:5556   85s
argocd-metrics                            192.168.1.23:8082                                       85s
argocd-notifications-controller-metrics   192.168.1.19:9001                                       85s
argocd-redis                              192.168.1.22:6379                                       85s
argocd-repo-server                        192.168.1.17:8084,192.168.1.17:8081                     85s
argocd-server                             192.168.1.21:8080,192.168.1.21:8080                     85s
argocd-server-metrics                     192.168.1.21:8083                                       85s

Look at the services - note the argocd-server service with ClusterIP 10.105.38.254 port(s) 80/TCP,443/TCP

$ kubectl --namespace argocd get service 
NAME                                      TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
argocd-applicationset-controller          ClusterIP   10.107.62.45     <none>        7000/TCP,8080/TCP            113s
argocd-dex-server                         ClusterIP   10.102.41.206    <none>        5556/TCP,5557/TCP,5558/TCP   113s
argocd-metrics                            ClusterIP   10.111.77.173    <none>        8082/TCP                     113s
argocd-notifications-controller-metrics   ClusterIP   10.100.24.197    <none>        9001/TCP                     113s
argocd-redis                              ClusterIP   10.100.133.38    <none>        6379/TCP                     113s
argocd-repo-server                        ClusterIP   10.106.117.208   <none>        8081/TCP,8084/TCP            113s
argocd-server                             ClusterIP   10.105.38.254    <none>        80/TCP,443/TCP               113s
argocd-server-metrics                     ClusterIP   10.98.252.11     <none>        8083/TCP                     113s

If you curl the argocd server cluster ip and port (10.105.38.254:443) or endpoint (192.168.1.21:8080), you should get something like this:

$ curl -k https://192.168.1.21:8080/swagger-ui
<!DOCTYPE html>
<html>
  <head>
    <title>API documentation</title>

                <meta charset="utf-8"/>
                <meta name="viewport" content="width=device-width, initial-scale=1">
                <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">

    
    <style>
      body {
        margin: 0;
        padding: 0;
      }
    </style>
  </head>
  <body>
    <redoc spec-url='/swagger.json'></redoc>
    <script src="/assets/scripts/redoc.standalone.js"> </script>
  </body>
</html>

If the curl responds, you can try to put the url in your browser and see if it connects. Otherwise look at the options in step 3 of this url for exposing the service (https://argo-cd.readthedocs.io/en/stable/getting_started/)

$ kubectl port-forward svc/argocd-server -n argocd 8080:443
TheAnalogyGuy
  • 376
  • 2
  • 9
1

The error “Unable to connect to the Server TCP I/O timeout” happens usually due to some common causes and you can try to troubleshoot based on below steps :

1)Your Kubernetes cluster is not running. Verify that your cluster has been started, e.g. by pinging the IP address.

2)There are networking issues that prevent you from accessing the cluster. Verify that you can ping the IP and try to track down whether there is a firewall in place which is preventing the access.

3)You have configured a cluster that does not exist any more. Also error might have resulted due to the IP address difference in the kubelet configuration.

4)Refer to this official doc about how to install ArgoCD in a local machine, as mentioned in the doc you need to run in the same namespace where Argo CD is installed. Try setting the current context as the default namespace by using below steps :

kubectl config set-context --current --namespace=argocd

To see your current context:

kubectl config current-context

To see the contexts you have:

kubectl config view

To switch context:

kubectl config use-context context-cluster-name`

Make sure you are using the correct kubectl context.

Also you can refer to this doc authored by Aruna Lakmal for more information about this error.

Sai Chandini Routhu
  • 750
  • 1
  • 3
  • 13