Skip to content

Instantly share code, notes, and snippets.

@christianh814
Last active September 2, 2023 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianh814/0b022a78dbe969c8edaeac8c72690586 to your computer and use it in GitHub Desktop.
Save christianh814/0b022a78dbe969c8edaeac8c72690586 to your computer and use it in GitHub Desktop.
Showing endpoints

Argo CD service

$  kubectl get svc -n argocd argocd-server
NAME            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
argocd-server   ClusterIP   172.30.198.16   <none>        80/TCP,443/TCP   73m

Argo CD Pod endpoints

$ kubectl get endpoints -n argocd argocd-server -o jsorpath='{.subsets[0].addresses}'  | jq -
[
  {
    "ip": "10.254.0.12",
    "nodeName": "kind-control-plane",
    "targetRef": {
      "kind": "Pod",
      "name": "argocd-server-66d84f9d5f-s6h8s",
      "namespace": "argocd",
      "uid": "22c3ef6e-8324-4115-b3dd-c872ab2df3bd"
    }
  },
  {
    "ip": "10.254.0.20",
    "nodeName": "kind-control-plane",
    "targetRef": {
      "kind": "Pod",
      "name": "argocd-server-66d84f9d5f-f5mjd",
      "namespace": "argocd",
      "uid": "7bb128e5-1eac-4414-9f3a-631ecc9b0676"
    }
  },
  {
    "ip": "10.254.0.21",
    "nodeName": "kind-control-plane",
    "targetRef": {
      "kind": "Pod",
      "name": "argocd-server-66d84f9d5f-cqlc4",
      "namespace": "argocd",
      "uid": "c9986128-2e0a-4f34-96f6-8f4da1f92666"
    }
  }
]

Show the backends from NGINX

$ kubectl ingress-nginx backends -n ingress-controller --deployment nginx-ingress-ingress-nginx-controller --backend argocd-argocd-server-443 | jq -r .endpoints
[
  {
    "address": "10.254.0.12",
    "port": "8080"
  },
  {
    "address": "10.254.0.20",
    "port": "8080"
  },
  {
    "address": "10.254.0.21",
    "port": "8080"
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment