GRPC routes¶
To use GRPCRoute:
- Install your traffic provider
- Install GatewayAPI CRD if your traffic provider doesn't do it by default
- Install Argo Rollouts
- Install Argo Rollouts GatewayAPI plugin
- Create stable and canary services
- Create GRPCRoute resource according to the GatewayAPI and your traffic provider documentation
apiVersion: gateway.networking.k8s.io/v1 kind: GRPCRoute metadata: name: first-grpcroute namespace: default spec: parentRefs: - name: traefik-gateway # read documentation of your traffic provider to understand what you need to specify here rules: - backendRefs: - name: argo-rollouts-stable-service # stable service you have created on the 5th step port: 80 - name: argo-rollouts-canary-service # canary service you have created on the 5th step port: 80 - Create Rollout resource
apiVersion: argoproj.io/v1alpha1 kind: Rollout metadata: name: rollouts-demo namespace: default spec: replicas: 2 strategy: canary: canaryService: argo-rollouts-canary-service stableService: argo-rollouts-stable-service trafficRouting: plugins: argoproj-labs/gatewayAPI: grpcRoute: first-grpcroute # grpcroute you have created on the 6th step namespace: default # namespace where your grpcroute is steps: - setWeight: 30 - pause: { duration: 2 } revisionHistoryLimit: 1 selector: matchLabels: app: rollouts-demo template: metadata: labels: app: rollouts-demo spec: containers: - name: rollouts-demo image: argoproj/rollouts-demo:red ports: - name: http containerPort: 8080 protocol: TCP resources: requests: memory: 32Mi cpu: 5m