KubeAdm - ArgoCD Deployment Images & Commands
KubeAdm - ArgoCD Commands
###Install ArgoCD###
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
###ArgoCD Credentials###
admin
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d && echo
###Delete ArgoCD###
kubectl delete applications --all -n argocd
kubectl delete appprojects --all -n argocd
kubectl delete ns argocd
kubectl get crds | grep argoproj | awk '{print $1}' | xargs kubectl delete crd
kubectl get ns | grep argocd
kubectl get crds | grep argoproj
kubectl patch deployment argocd-server \
-n argocd \
-p '{"spec":{"template":{"spec":{"containers":[{"name":"argocd-server","args":["--insecure"]}]}}}}'
kubectl apply -f argo-service.yaml
kubectl apply -f argocd-route.yaml
kubectl -n argocd logs deploy/argocd-server --tail=200
kubectl -n argocd exec -it deploy/argocd-server -- sh
kubectl -n nginx-gateway get gateway nginx-gateway -o yaml
kubectl logs -n cert-manager deployment/cert-manager
kubectl describe certificate argocd-tls -n nginx-gateway
kubectl get svc -n argocd argocd-server -o wide
ArgoCD Service & HTTPRoute
apiVersion: v1
kind: Service
metadata:
name: argocd-server
namespace: argocd
spec:
selector:
app.kubernetes.io/name: argocd-server
ports:
- name: https
port: 443
targetPort: 8080
protocol: TCP
nodePort: 30803
type: NodePort
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: argocd-route
namespace: argocd
spec:
parentRefs:
- name: nginx-gateway
namespace: nginx-gateway
hostnames:
- argocd.kishoreweb.com
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: argocd-server
port: 80
Tried Gateway API for HTTPS ArgoCD
#############################################
# 1. ClusterIssuer (Let's Encrypt Production)
#############################################
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-production
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: tha.kishorekumar@gmail.com
privateKeySecretRef:
name: letsencrypt-production
solvers:
- http01:
gatewayHTTPRoute: # ← FIXED: gatewayHTTPRoute (not gatewayAPI)
parentRefs:
- name: nginx-gateway # ← Your Gateway
namespace: nginx-gateway
labels: # ← Labels for temporary HTTPRoute (for ACME challenge)
acme.cert-manager.io/http01-solver: "true"
---
#############################################
# 2. TLS Certificate for ArgoCD
#############################################
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: argocd-tls
namespace: nginx-gateway
spec:
secretName: argocd-tls
dnsNames:
- argocd.kishoreweb.com
issuerRef:
name: letsencrypt-production
kind: ClusterIssuer
---
#############################################
# 3. GatewayClass (NGINX Gateway)
#############################################
apiVersion: gateway.networking.k8s.io/v1beta1 # ← FIXED: v1beta1 for EKS 1.28
kind: GatewayClass
metadata:
name: nginx
spec:
controllerName: gateway.nginx.org/nginx-gateway-controller
---
#############################################
# 4. Gateway (HTTP + HTTPS)
#############################################
apiVersion: gateway.networking.k8s.io/v1beta1 # ← FIXED: v1beta1
kind: Gateway
metadata:
name: nginx-gateway
namespace: nginx-gateway
spec:
gatewayClassName: nginx
listeners:
- name: http
port: 80
protocol: HTTP
allowedRoutes:
namespaces:
from: All
- name: https
port: 443
protocol: HTTPS
tls:
mode: Terminate
certificateRefs:
- name: argocd-tls
kind: Secret
allowedRoutes:
namespaces:
from: All
---
#############################################
# 5. HTTPRoute for ArgoCD (attached to HTTPS)
#############################################
apiVersion: gateway.networking.k8s.io/v1beta1 # ← FIXED: v1beta1
kind: HTTPRoute
metadata:
name: argocd-route
namespace: nginx-gateway
spec:
parentRefs:
- name: nginx-gateway
namespace: nginx-gateway
sectionName: https # ← Attaches to HTTPS listener
hostnames:
- argocd.kishoreweb.com
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: argocd-server
namespace: argocd
port: 443 # HTTPS backend