0

I have Docker running in WSL2 (no Docker Desktop in Windows, just docker engine within WSL), and a Kubernetes cluster created with kinD. Inside this cluster, there's an ArgoCD server.

I have built a little demo app which runs in port 8083, and returns just a "Hello, World" message when hitting localhost:8083.

I have deployed the app to my ArgoCD, using the following commands and yaml scripts:

demo-app-chart.yaml

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: demo-app
  namespace: argocd
spec:
  source:
    path: manifests
    repoURL: (the github repo for the yaml scripts)
    targetRevision: HEAD
  destination:
    server: 'https://kubernetes.default.svc'
    namespace: default # kube-system
  project: default
  syncPolicy:
    automated:
      prune: true

yaml scripts in repo:

Deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: demo-app
spec:
  replicas: 2
  selector:
    matchLabels:
      app: demo-app
  template:
    metadata:
      labels:
        app: demo-app
    spec:
      containers:
      - image: (path to docker image in docker hub)
        name: demo-app
        ports:
        - containerPort: 8083

Service:

apiVersion: v1
kind: Service
metadata:
  name: demo-app-service
spec:
  ports:
  - port: 8083
    protocol: TCP
    targetPort: 8083
  selector:
    app: demo-app
  type: NodePort

Ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demo-app-ingress
spec:
  rules:
  - host: kind.cluster.internal
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: demo-app-service
            port:
              number: 8083

The app is deployed, and Service, Deployment and Pods have Sync and Health status OK. Application and Ingress resources have Sync status OK, but the Health is stuck in "Progressing". Screenshot of the app in ArgoCD

I have tried getting the cluster IP like this:

$ docker ps
CONTAINER ID   IMAGE                  COMMAND                  CREATED             STATUS             PORTS                                                                                         NAMES
03f01542d6e5   kindest/node:v1.27.3   "/usr/local/bin/entr…"   About an hour ago   Up About an hour   0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:8080->8080/tcp, 127.0.0.1:35235->6443/tcp   my-super-cluster-control-plane
$ docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my-super-cluster-control-plane
172.18.0.2

And I added the Cluster IP to the /etc/hosts file in WSL to match the host name in the Ingress configuration:

172.18.0.2      kind.cluster.internal

But no change in the Application/Ingress status.

This is also the result I get when getting the services status:

$ kubectl get services
NAME               TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
demo-app-service   NodePort    10.96.110.156   <none>        8083:31707/TCP   43m
kubernetes         ClusterIP   10.96.0.1       <none>        443/TCP          86m

I'm thinking I need to do some route mapping, but don't know how actually do it. Any help will be very much appreciated.

Update When looking at the Ingress details, I see there's no "Address", and only port 80.

$ kubectl get ingress
NAME               CLASS    HOSTS                   ADDRESS   PORTS   AGE
demo-app-ingress   <none>   kind.cluster.internal             80      8h

$ kubectl describe ingress demo-app-ingress
Name:             demo-app-ingress
Labels:           app.kubernetes.io/instance=demo-app
Namespace:        default
Address:
Ingress Class:    <none>
Default backend:  <default>
Rules:
  Host                   Path  Backends
  ----                   ----  --------
  kind.cluster.internal
                         /   demo-app-service:8083 (10.244.0.2:8083,10.244.0.8:8083)
Annotations:             <none>
Events:                  <none>
  • 1
    Look at the Ingress details, it may have details. Likely the Ingress cannot be "registered" correctly in the Ingress Controller. – Gaël J Sep 02 '23 at 06:53
  • Thank you for your advice. There are no errors in the Summary view in ArgoCD UI. I have added some details I got from kubectl describe. – Mauricio Ramírez Sep 02 '23 at 13:57

0 Answers0