OpenShift
Introduction
Section titled “Introduction”OpenShift is a container orchestration platform as a service designed to simplify the deployment, scaling, and management of containerized applications. Built on Kubernetes, OpenShift provides a comprehensive set of tools and features that facilitate the orchestration, automation, and monitoring of containerized workloads.
You can deploy LocalStack on an OpenShift cluster, including Red Hat OpenShift Service on AWS (ROSA), as a cloud sandbox that emulates various AWS services and APIs. Because OpenShift is built on Kubernetes, you deploy LocalStack with the same tools you use on any other Kubernetes cluster.
Deploy LocalStack on OpenShift
Section titled “Deploy LocalStack on OpenShift”Choose one of the following supported deployment methods:
- Deploy with Helm: Install LocalStack with the official Helm chart.
- Deploy LocalStack Operator: Deploy and manage LocalStack instances with the LocalStack Operator.
Security context requirements
Section titled “Security context requirements”By default, OpenShift runs containers as an arbitrary non-root user. When you deploy LocalStack on OpenShift, make sure the user your deployment runs as is compatible with the deployment method you choose.
The LocalStack Operator only accepts a runAsUser value of 0 or 1000.
If your OpenShift security policy assigns a different user ID, the Operator does not accept it.
Connect to LocalStack on OpenShift
Section titled “Connect to LocalStack on OpenShift”Since LocalStack runs on the cluster rather than on your machine, point lstk at the route or endpoint that exposes your LocalStack instance instead of its default local endpoint.
Set LSTK_ENDPOINT_URL once for the whole session:
export LSTK_ENDPOINT_URL='<localstack-endpoint-url>'lstk aws s3 mb s3://my-bucketAlternatively, pass the global --endpoint-url flag per command:
lstk --endpoint-url '<localstack-endpoint-url>' aws s3 mb s3://my-bucketReplace <localstack-endpoint-url> with the URL that exposes your LocalStack instance.
The flag takes precedence over the environment variable.
You can use the other lstk tool proxies, such as lstk cdk, lstk sam, and lstk terraform, the same way.