Hi I am using a k8s job to register flyte workflow...
# flyte-support
a
Hi I am using a k8s job to register flyte workflows and works well in a production cluster but not with the local cluster set up with
flytectl demo start
. I always get
MaxRetryError: HTTPConnectionPool(host='localhost', port=30002)
as error and this look suspicious to me since I set up the
FLYTE_PLATFORM_URL
env var to
flyte-sandbox-grpc.flyte.svc.cluster.local:8089
. Where does it come from? I have tried setting up
FLYTECTL_CONFIG
env var and set the
storage.connection.endpoint
to
flyte-sandbox-minio.flyte.svc.cluster.local:9000
how can I properly create a configuration for pyflyte/flytectl and be sure that it will be used? Here’s my job configuration and the configmap I am using.
Copy code
apiVersion: v1
kind: ConfigMap
metadata:
  name: flyte-config
  namespace: default
data:
  config.yaml: |-
    admin:
      endpoint: flyte-sandbox-grpc.flyte.svc.cluster.local:8089
      insecure: true
    storage:
      type: minio
      connection:
        endpoint: flyte-sandbox-minio.flyte.svc.cluster.local:9000
  endpoint: flyte-sandbox-grpc.flyte.svc.cluster.local:8089
Copy code
apiVersion: batch/v1
kind: Job
metadata:
  name: pipeline-example-registation
  namespace: default
spec:
  template:
    spec:
      containers:
        - name: pipeline-example-registration
          image: localhost:30000/crystal.pipelines.example:test
          env:
            - name: DOCKER_IMAGE # i use it to specify what docker image must be used when registering the workflow
              value: localhost:30000/crystal.pipelines.example:test
            # - name: FLYTECTL_CONFIG
            #   value: /root/.flyte/config.yaml
            - name: FLYTE_PLATFORM_URL
              valueFrom:
                configMapKeyRef:
                  key: endpoint
                  name: flyte-config
            - name: FLYTE_PLATFORM_INSECURE
              value: "true"
            - name: FLYTE_PROJECT
              value: flytesnacks
            - name: FLYTE_DOMAIN
              value: dev
          volumeMounts:
            - mountPath: /root/.flyte
              name: flyte-config
      volumes:
        - name: flyte-config
          configMap:
            name: flyte-config
            items:
              - key: config.yaml
                path: config.yaml
      restartPolicy: Never
  ttlSecondsAfterFinished: 30
  backoffLimit: 0
Thanks