Remote Pods with JinaD

Prerequisites

Before you start, make sure you have read the prerequisites for using JinaD.

Inside a Flow

A common case of using Jina remotely is to have a Flow running locally with Pod on the remote. Following code creates a Flow with a remote Pod on 1.2.3.4 and uploads the pod yaml to remote using upload_files. All remote logs are collected by the Flow.

Python

from jina import Flow, Document
f = (Flow()
     .add(uses='_logforward',
          host='1.2.3.4:8000',
          upload_files=['custom_encoder.yml']))
with f:
    f.index(Document())

YAML

jtype: Flow
pods:
    - uses: _logforward
      host: 1.2.3.4:8000
      upload-files:
        - custom_encoder.yml

What’s next?

In case you’ve missed it, you may want to check out the following article. Remote Flows with JinaD