Connect an Application to LOTA
Connect an application running on GPU Nodes to LOTA
In some cases, users may want to connect an application running on GPU Nodes directly to LOTA. Rather than using the frontend gateway to perform actions, LOTA acts as a proxy to the backend for all S3 tasks.
Prerequisites
To connect an application to LOTA in CoreWeave AI Object Storage using the API, you will need:
- An active CoreWeave account, with:
- SAML/SSO configured, and
- at least one active Kubernetes cluster.
- The
HOSTIP
on which the application's Pod is running. - Adequate permissions to
create
,write
andread
buckets in CoreWeave AI Object Storage. kubectl
installed locally.- The current LOTA port, by default
8070
.- If an organization requires a different port location, CoreWeave can configure this on request.
Find the LOTA port
By default, LOTA listens on port 8070
. Unless this has been configured differently by CoreWeave, you can use this port in your SDK.
Find the HOSTIP
using kubectl
and the downward API
The downward API can be used to interrogate Kubernetes for information about running Pods as well as containers within Pods, to fetch metadata such as the Pod's name, namespace, and labels. However, the downward API does not expose the Node's HOSTIP
directly - it must be fetched manually using the status.hostIP
field from the Pod's metadata.
Adjust your application's manifest accordingly:
spec:image: <my-application-image>...env:- name: HOST_IPvalueFrom:fieldRef:fieldPath: status.hostIP
Key | Description |
---|---|
image | The application's container image. |
env | This section defines the environment variables available inside the container at runtime. Here, the env section defines the environment variable HOST_IP for the container. |
HOST_IP | This line defines an environment variable called HOST_IP , which is assigned the value of status.hostIP . This variable can then be referenced by the application. |
valueFrom.fieldRef.fieldPath | Set to status.hostIP to pass the value to the HOST_IP environment variable. |
Deploy your application manifest with the new HOST_IP
environment variable exposed.
$kubectl apply -f my-yaml.yaml
The host IP value (derived from the value of status.hostIP
) is now exposed as HOST_IP
on the container. For example, if the hostIP
is 10.0.0.8
, the HOST_IP
on the container will surface that value. Print the environment variable using printenv
via kubectl exec
.
$kubectl exec -it pod-name -- printenv HOST_IP10.0.0.7
Connect to LOTA via s3cmd
The LOTA port and host IP address can be used to configure the application's connection the same way they might configure any other S3 endpoint. At this stage, LOTA looks identical to a standard S3 implementation.
- Follow the instructions to configure your chosen SDK as outlined in How-To: Manage Buckets.
- Instead of the values described in the original configuration, enter the
HOST_IP
and LOTA port values when prompted. - The application is now configured to connect directly to LOTA.
For more information on using the downward API, see the official Kubernetes documentation.