Skip to main content
Version: 3.2

Application setup with bucket access in Rancher

This page describes how to use a PXBucketAccess object with your application. Note that the following steps are the same for AWS S3 buckets.

  1. In your application's deployment.yaml file, add all environment variables for your buckets as Kubernetes deployment secret references. For example:

        env:
    - name: S3_ACCESS_KEY
    valueFrom:
    secretKeyRef:
    name: px-os-credentials-s3-pba
    key: access-key-id
    - name: S3_SECRET_KEY
    valueFrom:
    secretKeyRef:
    name: px-os-credentials-s3-pba
    key: secret-access-key
    - name: S3_BUCKET_NAME
    valueFrom:
    secretKeyRef:
    name: px-os-credentials-s3-pba
    key: bucket-id
    - name: S3_ENDPOINT
    valueFrom:
    secretKeyRef:
    name: px-os-credentials-s3-pba
    key: endpoint
    - name: S3_REGION
    valueFrom:
    secretKeyRef:
    name: px-os-credentials-s3-pba
    key: region

  1. Apply the updates to your deployment.yaml:

    kubectl apply -f deployment.yaml

Was this page helpful?