Загрузка...

ArgoCD Day 07: Access ArgoCD through Gateway API

kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml

docker login # Login first if you get 401 errors
helm install eg oci://docker.io/envoyproxy/gateway-helm \
--version v1.6.1 \
--namespace envoy-gateway-system \
--create-namespace

kubectl apply --server-side -f https://github.com/envoyproxy/gateway/releases/download/v1.6.1/install.yaml

kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available

openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout tls.key -out tls.crt \
-subj "/CN=argocd.local"

kubectl create secret tls argocd-tls-secret \
--cert=tls.crt --key=tls.key -n argocd

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: argocd-gateway
namespace: argocd
spec:
gatewayClassName: eg # Created by 'helm install eg ...'
listeners:
- name: https
protocol: HTTPS
port: 443
tls:
mode: Terminate
certificateRefs:
- name: argocd-tls-secret
allowedRoutes:
namespaces:
from: Same

kubectl apply -f frontdoor.yaml
kubectl patch configmap argocd-cmd-params-cm -n argocd \
--type merge \
-p '{"data":{"server.insecure":"true"}}'

kubectl rollout restart deployment argocd-server -n argocd

kubectl rollout status deployment argocd-server -n argocd
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: argocd-route
namespace: argocd
spec:
parentRefs:
- name: argocd-gateway
namespace: argocd
sectionName: https
# NOTE: For local testing, comment out hostnames to accept any host
# hostnames:
# - "argocd.example.com"
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: argocd-server
port: 80

kubectl apply -f httproute.yaml
kubectl get gateway argocd-gateway -n argocd

kubectl port-forward -n envoy-gateway-system svc/envoy-argocd-gateway 8443:443

Видео ArgoCD Day 07: Access ArgoCD through Gateway API канала Tech IT Factory
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять