BYOC On-Premise¶
BYOC On-Premise lets a customer bring an existing Kubernetes cluster and use it as the deployment target for your Product. Omnistrate treats this target as the byoc-onprem provider with the on-prem deployment region.
The customer owns the Kubernetes cluster, nodes, storage, network routing, and endpoint exposure. Your generated control plane operates deployments in that cluster through your product dataplane agent.
Note
byoc-onprem is the value you pass to the --cloud-provider flag in omnistrate-ctl (for example omnistrate-ctl instance create --cloud-provider=byoc-onprem).
BYOC On-Premise is configured as a BYOC deployment Plan. Set up the provider side the same way you would for other BYOC Plans, then pass --cloud-provider=byoc-onprem when creating customer onboarding instances and product deployments. For the shared BYOC flow, see BYOC cloud accounts. For the Plan schema, see deployment schema.
This mode is different from an air-gapped installer. In BYOC On-Premise, the customer stays connected to your generated control plane. For air-gapped or fully disconnected environments, use the Air-Gapped installer model instead.
Architecture¶
The product dataplane agent runs in the customer cluster and opens outbound mTLS/gRPC agent connections to your control plane. The same agent connection pattern is used for the Manager Service, Infra Metadata Manager, and Monitoring Service.
The customer does not need to expose the Kubernetes API server publicly. The cluster needs outbound access to your control plane endpoints, plus any image registries and Helm chart registries required by your Plan and deployment-cell amenities.
Application traffic is separate from control-plane traffic. The customer decides whether product endpoints are private-only, reachable through a corporate network, or exposed through a public IP or load balancer.
Before You Start¶
Confirm the customer cluster has the baseline requirements for your product:
| Requirement | Details |
|---|---|
| Kubernetes cluster | A working Kubernetes cluster with a supported Kubernetes version |
kubectl access | The operator running the installation kit must target the intended cluster context |
| Pod networking | CNI and pod-to-pod networking must work |
| DNS and egress | Pods must resolve and reach your control plane endpoints and required registries |
| Storage | Required StorageClasses must exist if the Plan uses persistent volumes |
| Endpoint path | Ingress, load balancer, firewall, and DNS routing must match the endpoint exposure your Plan defines |
If your product needs cluster-level components, configure them as deployment-cell amenities, or have the customer install equivalent prerequisites before deploying product instances. Examples include ingress controllers, cert-manager, monitoring, endpoint checks, logging, and custom Helm packages. The BYOC On-Premise install kit installs the dataplane agent; amenities and product workloads are handled after the agent connects. See Deployment Cell Amenities.
End-to-End Walkthrough¶
This walkthrough uses PostgreSQL as the example product. The same sequence applies to other products that support byoc-onprem.
1. Provider prepares the Plan¶
Build and release a Plan that can deploy to customer-owned clusters. The product instance later selects BYOC On-Premise with --cloud-provider=byoc-onprem.
name: BYOC OnPrem Simple PG Test
deployment:
byoaDeployment:
AwsAccountId: '<aws-account-id>'
AwsBootstrapRoleAccountArn: 'arn:aws:iam::<aws-account-id>:role/omnistrate-bootstrap-role'
services:
- name: postgresChart
network:
ports:
- 5432
endpointConfiguration:
postgresEndpoint:
host: "$sys.network.internalClusterEndpoint"
ports:
- 5432
primary: true
networkingType: INTERNAL
BYOC On-Premise does not provision nodes; the customer-managed Kubernetes cluster is the deployment target. The Plan should define the product endpoints, parameters, persistent volumes, metrics, dashboards, and upgrade paths that apply to the customer deployment. This walkthrough uses an internal endpoint.
2. Create the BYOC On-Premise onboarding instance¶
The customer onboarding instance represents one customer-owned Kubernetes cluster. Passing --cluster-name (instead of a cloud-provider account flag such as --aws-account-id) selects the BYOC On-Premise path.
Create a working directory first. The onboarding command automatically downloads the generated install kit into the current directory.
mkdir -p dp-install-kit
cd dp-install-kit
omnistrate-ctl account customer create \
--service=<service-name> \
--environment=<environment-name> \
--plan=<plan-name> \
--cluster-name=<customer-cluster-name> \
--cluster-description="Customer production Kubernetes cluster"
If you create the onboarding instance on behalf of a customer, add --customer-email=<customer@example.com>.
Save the returned customer onboarding instance ID, for example instance-abc123. The command does not wait for the onboarding instance to become READY. After the dataplane agent connects, you pass the same onboarding instance ID as --customer-account-id in the deployment command.
3. Install the dataplane agent on the target cluster¶
Extract the kit and confirm kubectl targets the intended customer cluster:
# If the kit was downloaded elsewhere, copy or move it into this directory first.
tar xf byoc-onprem-install-kit-<account-config-id>.tar
kubectl config current-context
Run the installer against the current Kubernetes context:
The installer creates the dataplane-agent resources in the cluster. Amenities and product workloads are installed later by your control plane.
Test your deployment¶
If you do not have a customer cluster yet and want to validate the flow end to end, the same install kit can spin up a local or single-node test cluster.
For a fully local smoke test, create a k3d cluster:
If your test host has a public IP and you want to validate a public endpoint Plan, create a single-node K3s cluster on that host and advertise the public IP:
PUBLIC_IP=<node-public-ip>
./install.sh \
--create-k3s-cluster <cluster-name> \
--k3s-node-external-ip "${PUBLIC_IP}" \
--non-interactive
For a public endpoint Plan, use the external cluster endpoint in the Plan instead of the internal one:
services:
- name: postgresChart
network:
ports:
- 5432
endpointConfiguration:
postgresEndpoint:
host: "$sys.network.externalClusterEndpoint"
ports:
- 5432
primary: true
networkingType: PUBLIC
In production, customers install into their existing Kubernetes cluster and skip the --create-k3d-cluster / --create-k3s-cluster flags.
4. Verify the account configuration¶
After the agent connects to your control plane, the BYOC On-Premise account configuration moves to READY.
Continue when account_status is READY.
5. Deploy a product instance¶
Create the product instance and pass the BYOC On-Premise onboarding instance ID as --customer-account-id.
For the PostgreSQL example, create a parameter file:
omnistrate-ctl instance create \
--service=<service-name> \
--environment=<environment-name> \
--plan=<plan-name> \
--version=latest \
--resource=postgresChart \
--cloud-provider=byoc-onprem \
--region=on-prem \
--customer-account-id=<customer-account-instance-id> \
--param-file=./params.json \
--wait
Verify the instance from your control plane:
Verify the workload in the customer cluster with the same Kubernetes context used to run install.sh. Restrict the query to the instance namespace:
6. Operate the instance¶
After the instance is running, lifecycle operations continue through your control plane:
omnistrate-ctl instance dashboard <instance-id>
omnistrate-ctl instance version-upgrade <instance-id> --target-version=<version>
omnistrate-ctl instance delete <instance-id>
The customer can still inspect and operate their Kubernetes cluster with their own tools.
Re-download the install kit for reinstall or recovery
The normal onboarding flow does not need a separate download command because omnistrate-ctl account customer create automatically downloads the generated kit. To download the kit again for an existing customer onboarding instance, run:
Then extract the fresh kit and rerun ./install.sh against the target Kubernetes context.
Plans That Bootstrap Their Own Cell¶
A BYOC On-Premise Plan can create the customer's Kubernetes cluster and install the dataplane agent itself. In this pattern, the Plan includes an internal Terraform Resource that runs on the Omnistrate-generated Control Plane cluster in your account. Its Terraform stack creates a Kubernetes cluster in the environment that the customer chooses and installs the dataplane agent on it with Helm. The customer does not run the install kit.
The Terraform Resource runs on the Control Plane cluster, so the location of the cell does not depend on where the Control Plane cluster runs. The cell can be in any cloud account or in an on-premises data center, provided that the Terraform stack can reach that environment and authenticate to it, and that the dataplane agent can reach the control plane from there. The Kubernetes distribution is also a choice of the stack. The example in this guide targets AWS, creates an EC2 VM, and installs k3s on it. AWS and k3s are choices of the example. A stack could create a managed cluster such as EKS, GKE, or AKS, or a cluster on on-premises hardware, in the same way.
Plan shape¶
The Plan has two kinds of Resources:
- An internal Terraform Resource, called
cellInfrain this guide, withdeploymentTarget.account: ControlPlane. This Resource runs on the Omnistrate-generated Control Plane cluster in your account, so it can run while the BYOC On-Premise cell is stillPENDING. Its Terraform stack creates the Kubernetes cluster and installs the dataplane agent. In the example, the cluster is k3s on an EC2 VM. - The workload Resources of your product. Each workload Resource lists
cellInfraindependsOn.
A deployment proceeds in this order:
- Omnistrate runs the
cellInfraTerraform stack on the Control Plane cluster. The stack uses credentials for the customer's target environment. In the example, these credentials come from an IAM role in the customer's AWS account. - The dataplane agent on the new VM connects to your control plane. The platform moves the cell to
RUNNINGand installs the deployment cell amenities. - The workload Resources deploy on the cell.
Each Resource waits for its own target host cluster. A ControlPlane Resource waits for the Control Plane cluster, and every other Resource waits for the BYOC On-Premise cell. As a result, cellInfra starts while the cell is PENDING, and the workload Resources start after the agent connects.
cellInfra reads the customer's cell under $sys.deploymentCell.customerDeploymentCell.*. For a ControlPlane Resource, $sys.deploymentCell itself describes the Control Plane cluster. The agent namespace, release name, chart, Helm values, and registry credentials are listed in BYOC on-prem deployment cell parameters.
Example Plan¶
The following Plan deploys PostgreSQL on a cell that cellInfra creates. The example targets AWS. It uses the terraform/aws-ec2-k3s-cell module from the public terraform-byok repository at tag v1.0.1. The example is shortened from a Plan that Omnistrate runs in its end-to-end tests.
name: BYOC OnPrem PG
deployment:
byoaDeployment:
AwsAccountId: '<aws-account-id>'
AwsBootstrapRoleAccountArn: 'arn:aws:iam::<aws-account-id>:role/omnistrate-bootstrap-role'
services:
- name: postgresChart
dependsOn:
- cellInfra
compute:
instanceTypes:
- name: t4g.small
cloudProvider: aws
- name: byoc-onprem-node
cloudProvider: byoc-onprem
network:
ports:
- 5432
helmChartConfiguration:
chartName: postgresql
chartVersion: 16.7.27
chartRepoName: bitnamicharts
chartRepoURL: oci://ghcr.io/omnistrate/charts
chartValues:
global:
postgresql:
auth:
postgresPassword: "$var.pgPassword"
apiParameters:
- key: pgPassword
description: PostgreSQL admin password
name: PG Password
type: String
required: true
export: false
modifiable: false
- key: customerRoleArn
name: Customer role ARN
description: ARN of the role from the cell CloudFormation stack that Terraform assumes
type: String
modifiable: false
required: true
export: false
parameterDependencyMap:
cellInfra: customerRoleArn
- key: awsRegion
name: AWS region
description: Region of the k3s VM
type: String
modifiable: false
required: true
export: false
parameterDependencyMap:
cellInfra: awsRegion
- name: cellInfra
internal: true
deploymentTarget:
account: ControlPlane
apiParameters:
- key: customerRoleArn
name: Customer role ARN
description: ARN of the role from the cell CloudFormation stack that Terraform assumes
type: String
modifiable: false
required: true
export: false
- key: awsRegion
name: AWS region
description: Region of the k3s VM
type: String
modifiable: false
required: true
export: false
terraformConfigurations:
configurationPerCloudProvider:
aws:
terraformPath: /terraform/aws-ec2-k3s-cell
gitConfiguration:
reference: refs/tags/v1.0.1
repositoryUrl: https://github.com/omnistrate-community/terraform-byok.git
terraformExecutionIdentity: "{{ $var.customerRoleArn }}"
variablesValuesFileOverride: |
deployment_id = "{{ $sys.id }}"
cell_name = "{{ $sys.deploymentCell.customerDeploymentCell.clusterName }}"
region = "{{ $var.awsRegion }}"
agent_chart_repository = "{{ $sys.deploymentCell.customerDeploymentCell.agent.chart.repository }}"
agent_chart_version = "{{ $sys.deploymentCell.customerDeploymentCell.agent.chart.version }}"
agent_namespace = "{{ $sys.deploymentCell.customerDeploymentCell.agent.namespace }}"
agent_release_name = "{{ $sys.deploymentCell.customerDeploymentCell.agent.releaseName }}"
agent_helm_values_base64 = "{{ $sys.deploymentCell.customerDeploymentCell.agent.helmValuesBase64 }}"
# Include the agent_registry_* lines only when your organization installs
# the dataplane agent from a private Amazon ECR registry.
agent_registry_host = "{{ $sys.deploymentCell.customerDeploymentCell.agent.registry.host }}"
agent_registry_username = "{{ $sys.deploymentCell.customerDeploymentCell.agent.registry.username }}"
agent_registry_password = "{{ $sys.deploymentCell.customerDeploymentCell.agent.registry.password }}"
agent_registry_docker_config_json_base64 = "{{ $sys.deploymentCell.customerDeploymentCell.agent.registry.dockerConfigJSONBase64 }}"
agent_registry_pull_secret_name = "{{ $sys.deploymentCell.customerDeploymentCell.agent.registry.pullSecretName }}"
requiredOutputs:
- key: vm_id
exported: true
- key: vm_public_ip
exported: true
- key: vm_private_ip
exported: true
The workload Resource declares customerRoleArn and awsRegion and passes them to cellInfra with parameterDependencyMap, so the customer enters them when creating the deployment. terraformExecutionIdentity renders the role ARN that Terraform uses in the customer's account. See Templated execution identity for BYOC On-Premise cells.
The Terraform stack must meet these requirements:
- When the stack runs on AWS with a templated
terraformExecutionIdentity, the AWS provider must use the credentials that Omnistrate injects. Do not configureassume_roleor static access keys in the provider block. - Omnistrate loads only Terraform files from a module in Git. Keep templates, such as the cloud-init document for the VM, inside
.tffiles. - The registry token changes every time Omnistrate renders the parameters. Ignore changes to the VM user data, for example with
lifecycle { ignore_changes = [user_data_base64] }on theaws_instanceresource.
Account instance outputs¶
Every BYOC On-Premise account instance publishes the values that the customer needs to trust the Terraform identity. They appear in the output of omnistrate-ctl account customer describe <customer-account-instance-id>.
| Output | Value |
|---|---|
terraform_identity_oidc_issuer_url | OIDC issuer URL of the Omnistrate-generated Control Plane cluster that runs the Terraform pod |
terraform_identity_subject | system:serviceaccount:dataplane-agent:tf-<accountInstanceId> |
terraform_identity_audience | https://kubernetes.default.svc |
Account instances created before this feature was released do not have these outputs.
Customer setup on AWS¶
This setup applies to the AWS example. For other target environments, see Credentials for the target environment.
The customer creates an IAM OIDC provider and an IAM role in the AWS account that hosts the VM. The cell-terraform-role.yaml CloudFormation template in terraform-byok v1.0.1 creates both. The OIDC provider uses the issuer URL, with the audience as its client ID. The role trusts the provider with StringEquals conditions on <issuer-host>:sub set to the subject and <issuer-host>:aud set to the audience, and it grants the EC2 permissions that the cell module needs.
The template takes these parameters:
| Parameter | Value |
|---|---|
OIDCIssuerURL | terraform_identity_oidc_issuer_url output of the account instance |
Subject | terraform_identity_subject output of the account instance |
Audience | terraform_identity_audience output of the account instance. The default is https://kubernetes.default.svc. |
ExistingOIDCProviderArn | ARN of an IAM OIDC provider that already exists for the issuer. Leave it empty to create the provider in the stack. |
RoleName | Name of the role. The default is omnistrate-k3s-cell-terraform. |
The stack output CellTerraformRoleArn is the role ARN. The customer enters it as the customerRoleArn parameter when creating the deployment.
To onboard a customer with this Plan:
- Create the BYOC On-Premise account instance with
omnistrate-ctl account customer createand--cluster-name, as in Create the BYOC On-Premise onboarding instance. The customer does not run the install kit. - Read the three outputs with
omnistrate-ctl account customer describe. - The customer deploys the CloudFormation template with those outputs in their AWS account.
- Create the deployment with
--cloud-provider=byoc-onprem,--region=on-prem, and--customer-account-id=<customer-account-instance-id>, and passCellTerraformRoleArnascustomerRoleArntogether withawsRegionin the parameter file.
Pitfalls¶
- An AWS account can hold only one IAM OIDC provider per issuer URL. If a provider for the issuer already exists, pass its ARN as
ExistingOIDCProviderArn. That provider must listhttps://kubernetes.default.svcas a client ID. If it lists onlysts.amazonaws.com, STS rejects the token withInvalidIdentityToken. Add the client ID withaws iam add-client-id-to-open-id-connect-provider. - The default setup uses one role per account instance, with an exact subject in the trust policy. A service provider that runs many account instances against one role, for example in CI, can use
StringLikeonsystem:serviceaccount:dataplane-agent:tf-instance-*. That role then trusts every account instance on the same control plane. - The rendered
terraformExecutionIdentitymust be an IAM role ARN. Any other value fails the deployment with the non-retryable errorInvalidTerraformExecutionIdentity.
Deleting a deployment¶
Deleting the deployment runs Terraform destroy for cellInfra, which terminates the VM. The cleanup steps that target the cell then fail after their timeouts, because the cell no longer exists, and the deployment remains in that state. To start over, the customer deletes the BYOC On-Premise account instance and creates a new one.
Credentials for the target environment¶
Omnistrate injects credentials into the Terraform pod only for AWS, through a templated terraformExecutionIdentity. The example in this guide uses that path, and it is the path that Omnistrate tests end to end. GCP, Azure, OCI, and Nebius entries reject a templated terraformExecutionIdentity.
For any other target environment, the Terraform stack authenticates to that environment itself. The Terraform pod runs with the service account token at $sys.deploymentCell.customerDeploymentCell.terraformIdentity.tokenFile, and the customer receives the issuer, subject, and audience as account instance outputs. A stack for GCP or Azure can therefore use the workload identity federation of that cloud. A stack for on-premises infrastructure can take provider credentials as API parameters or as secrets.
Control Plane Access¶
The customer controls control plane access to a BYOC On-Premise cluster through the dataplane agent Helm release. For an overview of customer-controlled permissions across BYOC environments, see Customer-Controlled BYOC Governance. Run these commands with kubectl and Helm configured for the intended customer cluster.
To revoke access, uninstall the agent release:
This disconnects the cluster from your generated control plane. It does not uninstall existing product workloads, but the control plane cannot monitor them or perform provisioning, updates, scaling, repairs, or deletion while the agent is absent.
To grant or restore access, generate a fresh install kit for the customer onboarding instance:
mkdir -p dp-install-kit
cd dp-install-kit
omnistrate-ctl account customer install-kit <customer-onboarding-instance-id>
tar xf byoc-onprem-install-kit-<account-config-id>.tar
The extracted kit's README.md contains the generated Helm command with the correct chart version and account-specific values.yaml. It has this form:
helm upgrade --install dp-agent \
oci://ghcr.io/omnistrate/dataplane-agent-chart \
--version <generated-chart-version> \
--namespace dataplane-agent --create-namespace \
--values values.yaml \
--set nameOverride=dp-agent \
--timeout 10m0s \
--wait
Treat the generated install kit and values.yaml as sensitive account-specific material. After installation, verify that the agent is running and that the account configuration returns to READY:
kubectl -n dataplane-agent get pods
helm -n dataplane-agent status dp-agent
omnistrate-ctl account customer describe <customer-onboarding-instance-id>
Native Logs¶
BYOC On-Premise supports native log collection for Helm resources. When features.INTERNAL.logs.provider: native is set in a Helm-based Plan spec, Omnistrate deploys a per-instance OpenTelemetry collector that ships workload logs to CloudWatch Logs in the SaaS Provider's AWS account.
No additional cloud logging credentials are required on the customer cluster beyond the standard dataplane agent installation. Omnistrate supplies the OpenTelemetry collector with scoped AWS credentials that write only to the instance's CloudWatch log groups and stream prefix in the SaaS Provider's AWS account. Keep ExpandBoundaryForAWSServiceIntegrations=true in that AWS account's generated CloudFormation stack so Omnistrate can provide these credentials.
The customer cluster must have an HTTPS network path to the regional AWS CloudWatch Logs endpoint. It can use public egress or private, routed connectivity to an AWS CloudWatch Logs interface VPC endpoint. A private path requires appropriate routing and DNS, such as connectivity through a VPN or AWS Direct Connect. Native logs are not available in air-gapped clusters that cannot reach CloudWatch Logs.
For configuration details, see Send Helm Resource Logs to CloudWatch Logs.
Limitations¶
- The customer cluster must have outbound connectivity to your control plane.
- BYOC On-Premise is not for fully air-gapped environments; use the Air-Gapped installer for that model.
- Each customer onboarding instance maps to one Kubernetes cluster.
- Endpoint reachability depends on the customer's DNS, firewall, load balancer, and routing configuration.
