github.com/pachyderm/pachyderm@v1.13.4/doc/docs/1.10.x/concepts/pipeline-concepts/pipeline/service.md (about)

     1  # Service
     2  
     3  Service is a special type of pipeline that does not process data but provides
     4  a capability to expose it to the outside world. For example, you can use
     5  a service to serve a machine learning model as an API that has the most
     6  up-to-date version of your data.
     7  
     8  The following pipeline spec extract is an example of how you can expose your
     9  Jupyter notebook as a service by adding a `service` field:
    10  
    11  ```json
    12  {
    13      "input": {
    14          "pfs": {
    15              "glob": "/",
    16              "repo": "input"
    17          }
    18      },
    19      "service": {
    20          "external_port": 30888,
    21          "internal_port": 8888
    22      },
    23      "transform": {
    24          "cmd": [
    25              "start-notebook.sh"
    26          ],
    27          "image": "jupyter/datascience-notebook"
    28      }
    29  }
    30  ```
    31  
    32  The service section specifies the following parameters:
    33  
    34  | Parameter         | Description   |
    35  | ----------------- | ------------- |
    36  | `"internal_port"` | The port that the code running inside the container binds to. |
    37  | `"external_port"` | The port that is exposed outside of the container. You must <br> set this value in the range of `30000 — 32767`. You can access the <br> service from any Kubernetes node through the following address: <br> `http://<kubernetes-host>:<external_port>`. |
    38  
    39  !!! note "See Also:"
    40  
    41  - [Service](../../../../reference/pipeline_spec/#service-alpha-feature-optional)