“Argo CD Installation issue” 可以翻译为 “Argo CD安装问题”。

huangapple go评论56阅读模式
英文:

Argo CD Installation issue

问题

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? By the way, I'm new to argo...

英文:

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...

答案1

得分: 1

在killercoda playground中玩argocd。这可能是开始学习和尝试它的最简单方法。
https://killercoda.com/mabusaa/course/argocd-endusers-scenarios/00-argocd-playground

或者按照这个指南:
https://dev.to/abhinavd26/all-about-argocd-a-beginners-guide-33c9

确保您的端点和服务正常运行,并且可以curl端点。确保阅读有关入口和连接位置的部分。

您还需要确保您的网络设置正确,以允许您访问端点。

以下是从运行killercoda示例中获取的快速示例...

$ 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

查看argocd-server pod是否在运行(最下面一个)

$ 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

查看端点 - 注意argocd-server端点在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

查看服务 - 注意具有ClusterIP 10.105.38.254端口80/TCP、443/TCP的argocd-server服务

$ 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

如果您curl argocd服务器的Cluster IP和端口(10.105.38.254:443)或端点(192.168.1.21:8080),您应该会得到类似以下内容:

$ 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>

如果curl有响应,您可以尝试将URL放入浏览器中查看是否连接

英文:

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

答案2

得分: 1

错误“无法连接到服务器TCP I/O超时”通常是由一些常见原因引起的,您可以根据以下步骤进行故障排除:

  1. 您的 Kubernetes 集群未运行。验证集群是否已启动,例如通过ping IP地址。

  2. 存在网络问题,阻止您访问集群。验证是否可以ping IP,并尝试查找是否有防火墙阻止访问。

  3. 您配置了一个不存在的集群。错误可能还由于kubelet配置中IP地址差异引起。

  4. 参考此官方文档了解如何在本地机器上安装 ArgoCD,正如文档中所述,您需要在安装了 Argo CD 的相同命名空间中运行。尝试使用以下步骤将当前上下文设置为默认命名空间:

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

查看当前上下文

kubectl config current-context

查看您拥有的上下文

kubectl config view

切换上下文

kubectl config use-context context-cluster-name`

确保您使用的是正确的kubectl上下文。

还可以参考Aruna Lakmal编写的此文档,了解有关此错误的更多信息。

英文:

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.

huangapple
  • 本文由 发表于 2023年5月11日 09:32:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76223564.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定