Using Kubernetes API Gateway with Argo Rollouts

Context

StepNameNamespaceOnce PerKindPurpose
2egdefaultClusterGatewayClassCreate a gateway
2egdefaultClusterGateway
3gateway-controller-roleargo-rolloutsClusterClusterRoleAllow Argo Rollouts to edit Http Routes
3gateway-admin?ClusterClusterRoleBinding
4argo-rollouts-http-routedefaultApplicationHTTPRouteCreate an HTTP route
5argo-rollouts-stable-servicedefaultApplicationServiceCreate a Rollout
5argo-rollouts-canary-servicedefaultApplicationService
5rollouts-demodefaultApplicationRollout

Review

export POD_ID="$(k get pod -n argo-rollouts | grep argo-rollouts | awk '{ print $1}')"
k logs -f -n argo-rollouts $POD_ID
Show me
time="2025-01-30T06:16:01Z" level=info msg="Downloading plugin argoproj-labs/gatewayAPI from: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/releases/download/v0.4.0/gatewayapi-plugin-linux-amd64"
time="2025-01-30T06:16:07Z" level=info msg="Download complete, it took 6.021917129s"

The logs should of the Argo Rollouts Controller pod should show the downloading of the plugin. Note that Argo Rollouts is configured to download, install and use this plugin using a ConfigMap with the name argo-rollouts-config. Note that you have to restart the Argo Rollouts deployment for this ConfigMap to be used, this restart is performed by Ansible as part of the first part of this tutorial1.

Install and Manage Argo CD with Ansible: Set up a Kubernetes Cluster, install Argo CD, and manage both using C2 Platform’s Ansible roles for Linux and Kubernetes.

Additional Information


  1. You can perform this restart manuallyyourself by using the following command:

    kubectl rollout restart deployment -n argo-rollouts argo-rollouts
    

    We van have Ansible perform the restart for us using the kubernetes_resources variable, which is configured in the file group_vars/argocd/argo_rollouts_gateway_api.yml  :

    - name: Restart Argo Rollouts
      type: shell
      cmd: |
        kubectl rollout restart deployment -n {{ c2_argocd_rollouts_namespace }} argo-rollouts
        touch /etc/argo-rollouts-restart    
      creates: /etc/argo-rollouts-restart
    
     ↩︎


Last modified May 23, 2025: argocd C2-664 C2-679 C2-722 (40968af)