<#2729 [Docs] Provide an option to deploy to GCP v...
# flyte-github
c
#2729 [Docs] Provide an option to deploy to GCP via Opta without requiring a registered domain Issue created by tszumowski Description Background Ref: This slack thread. Some users may wish to have a simple deployment-to-GCP option, but do not currently have a registered domain they wish to bind to Flyte. @jeevb provided a sample Envoy configuration that allows one to port-forward a single port from Kubernetes and have access to the UI without exposing to a domain. The suggestion is to add this Envoy option to the GCP deployment docs. Files The following was provided by @jeevb (with some simplifications in the config): envoy.yaml
Copy code
apiVersion: apps/v1
kind: Deployment
metadata:
  name: flyte-proxy
  labels:
    app: flyte-proxy
spec:
  selector:
    matchLabels:
      app: flyte-proxy
  template:
    metadata:
      labels:
        app: flyte-proxy
    spec:
      containers:
        - name: proxy
          image: envoyproxy/envoy:v1.21.1
          args:
            - envoy
            - -c /etc/envoy/config.yaml
          ports:
            - name: http
              containerPort: 8000
          volumeMounts:
            - name: config-volume
              mountPath: /etc/envoy
      volumes:
        - name: config-volume
          configMap:
            name: flyte-proxy-config
config.yaml
Copy code
admin:
  access_log_path: /dev/null
  address:
    socket_address:
      address: 127.0.0.1
      port_value: 9901
static_resources:
  listeners:
  - address:
      socket_address:
        address: 0.0.0.0
        port_value: 8000
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": <http://type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager|type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager>
          stat_prefix: ingress_http
          codec_type: AUTO
          route_config:
            name: local_route
            virtual_hosts:
            - name: backend
              domains:
              - "*"
              routes:
              - match:
                  path: "/"
                redirect:
                  path_redirect: "/console/"
              - match:
                  prefix: "/console"
                route:
                  cluster: flyteconsole
              - match:
                  prefix: "/__webpack_hmr"
                route:
                  cluster: flyteconsole
              - match:
                  prefix: "/api"
                route:
                  cluster: flyteadmin
              - match:
                  prefix: "/healthcheck"
                route:
                  cluster: flyteadmin
              - match:
                  prefix: "/v1"
                route:
                  cluster: flyteadmin
              - match:
                  prefix: "/login"
                route:
                  cluster: flyteadmin
              - match:
                  prefix: "/me"
                route:
                  cluster: flyteadmin
              - match:
                  prefix: "/flyteidl.service.AdminService"
                route:
                  cluster: flyteadmin_grpc
              - match:
                  prefix: "/openapi"
                route:
                  cluster: flyteadmin_redoc
          http_filters:
          - name: envoy.filters.http.router
  clusters:
  - name: flyteconsole
    connect_timeout: 0.25s
    type: STRICT_DNS
    lb_policy: ROUND_ROBIN
    load_assignment:
      cluster_name: flyteconsole
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: flyteconsole
                port_value: 80
  - name: flyteadmin
    connect_timeout: 0.25s
    type: STRICT_DNS
    lb_policy: ROUND_ROBIN
    load_assignment:
      cluster_name: flyteadmin
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: flyteadmin
                port_value: 80
  - name: flyteadmin_grpc
    connect_timeout: 0.25s
    type: STRICT_DNS
    lb_policy: ROUND_ROBIN
    http2_protocol_options: {}
    load_assignment:
      cluster_name: flyteadmin_grpc
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: flyteadmin
                port_value: 81
  - name: flyteadmin_redoc
    connect_timeout: 0.25s
    type: STRICT_DNS
    lb_policy: ROUND_ROBIN
    load_assignment:
      cluster_name: flyteadmin_redoc
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: flyteadmin
                port_value: 87
Directions 1. Create configmap in flyte namespace:
kubectl -n flyte create configmap flyte-proxy-config --from-file config.yaml
2. Apply the spec:
kubect -n flyte apply -f envoy.yaml
3. Port Forward:
kubectl -n flyte port-forward deployment/flyte-proxy 30080:8000
4. Update
~/.flyte/config.yaml
to point to `localhost:8000" Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte