Create a container registry pull secret. Your credentials to authenticate with ocir.immuta.com can be viewed in your user profile at support.immuta.com.
There are numerous ways to connect to a PostgreSQL database. This step demonstrates how to connect by creating an ephemeral Kubernetes pod.
Connect to the database as superuser (postgres) by creating an ephemeral container inside the Kubernetes cluster. A shell prompt will not be displayed after executing the kubectl run command outlined below. Wait 5 seconds, and then proceed by entering a password.
CREATEROLE immuta withloginencryptedpassword'<postgres-password>';GRANT immuta TO CURRENT_USER;CREATEDATABASEimmutaOWNER immuta;GRANT all ONDATABASE immuta TO immuta;ALTERROLE immuta SET search_path TO bometadata,public;
Revoke privileges from CURRENT_USER as they're no longer required.
REVOKE immuta FROM CURRENT_USER;
Enable the pgcrypto extension.
\c immutaCREATE EXTENSION pgcrypto;
Type \q, and then press Enter to exit.
Install Immuta
This section demonstrates how to deploy Immuta using the Immuta Enterprise Helm chart once the prerequisite cloud-managed services are configured.
Create a Helm values file named immuta-values.yaml with the following content:
Create a container registry pull secret. Your credentials to authenticate with ocir.immuta.com can be viewed in your user profile at support.immuta.com.
There are numerous ways to connect to a PostgreSQL database. This step demonstrates how to connect by creating an ephemeral Kubernetes pod.
Connect to the database as superuser (postgres) by creating an ephemeral container inside the Kubernetes cluster. A shell prompt will not be displayed after executing the oc run command outlined below. Wait 5 seconds, and then proceed by entering a password.
CREATEROLE immuta withloginencryptedpassword'<postgres-password>';GRANT immuta TO CURRENT_USER;CREATEDATABASEimmutaOWNER immuta;GRANT all ONDATABASE immuta TO immuta;ALTERROLE immuta SET search_path TO bometadata,public;
Revoke privileges from CURRENT_USER as they're no longer required.
REVOKE immuta FROM CURRENT_USER;
Enable the pgcrypto extension.
\c immutaCREATE EXTENSION pgcrypto;
Type \q, and then press Enter to exit.
Install Immuta
This section demonstrates how to deploy Immuta using the Immuta Enterprise Helm chart once the prerequisite cloud-managed services are configured.
Create a Helm values file named immuta-values.yaml with the content below. Because the Ingress resource will be managed by an OpenShift route you will create when configuring Ingress and not the Immuta Enterprise Helm chart, ingress is set to false below. TLS comes pre-configured with OpenShift, so tls is also set to false.
global:imageRegistry:ocir.immuta.comimagePullSecrets: - name:immuta-oci-registryimageRepositoryMap:immuta/immuta-service:stable/immuta-serviceimmuta/immuta-db:stable/immuta-dbimmuta/immuta-fingerprint:stable/immuta-fingerprintimmuta/audit-service:stable/audit-serviceimmuta/audit-export-cronjob:stable/audit-export-cronjobimmuta/classify-service:stable/classify-serviceimmuta/cache:stable/cacheaudit:enabled:falsedeployment:podSecurityContext:# A number that is within the project range:# oc get project <project-name> --output template='{{index .metadata.annotations "openshift.io/sa.scc.uid-range"}}{{"\n"}}'runAsUser:<user-id># A number that is within the project range:# oc get project <project-name> --output template='{{index .metadata.annotations "openshift.io/sa.scc.supplemental-groups"}}{{"\n"}}'runAsGroup:<group-id>seccompProfile:type:RuntimeDefaultcontainerSecurityContext:allowPrivilegeEscalation:falsecapabilities:drop: - ALLdiscover:deployment:podSecurityContext:# A number that is within the project range:# oc get project <project-name> --output template='{{index .metadata.annotations "openshift.io/sa.scc.uid-range"}}{{"\n"}}'runAsUser:<user-id># A number that is within the project range:# oc get project <project-name> --output template='{{index .metadata.annotations "openshift.io/sa.scc.supplemental-groups"}}{{"\n"}}'runAsGroup:<group-id>seccompProfile:type:RuntimeDefaultcontainerSecurityContext:allowPrivilegeEscalation:falsecapabilities:drop: - ALLsecure:extraEnvVars: - name:FeatureFlag_AuditServicevalue:"false" - name:FeatureFlag_detectvalue:"false" - name:FeatureFlag_auditLegacyViewHidevalue:"false"ingress:enabled:falsetls:falsepostgresql:host:<postgres-fqdn>port:5432database:immutausername:immutapassword:<postgres-password>ssl:trueweb:podSecurityContext:# A number that is within the project range:# oc get project <project-name> --output template='{{index .metadata.annotations "openshift.io/sa.scc.uid-range"}}{{"\n"}}'runAsUser:<user-id># A number that is within the project range:# oc get project <project-name> --output template='{{index .metadata.annotations "openshift.io/sa.scc.supplemental-groups"}}{{"\n"}}'runAsGroup:<group-id>seccompProfile:type:RuntimeDefaultcontainerSecurityContext:allowPrivilegeEscalation:falsecapabilities:drop: - ALLbackgroundWorker:podSecurityContext:# A number that is within the project range:# oc get project <project-name> --output template='{{index .metadata.annotations "openshift.io/sa.scc.uid-range"}}{{"\n"}}'runAsUser:<user-id># A number that is within the project range:# oc get project <project-name> --output template='{{index .metadata.annotations "openshift.io/sa.scc.supplemental-groups"}}{{"\n"}}'runAsGroup:<group-id>seccompProfile:type:RuntimeDefaultcontainerSecurityContext:allowPrivilegeEscalation:falsecapabilities:drop: - ALL
This is a generic guide that demonstrates how to deploy Immuta into any Kubernetes cluster without dependencies on any particular cloud provider.
Considerations
For the purposes of this guide, the PostgreSQL state stores are deployed in Kubernetes using third-party Helm charts maintained by Bitnami.
Running production-grade stateful workloads (e.g, databases) in Kubernetes is difficult and heavily discouraged due to the following reasons.
Operational overhead: Managing PostgreSQL on Kubernetes requires expertise in deploying, maintaining, and scaling these databases and search engines effectively. This involves tasks like setting up monitoring, configuring backups, managing updates, and ensuring high availability. Cloud-managed services abstract much of this operational burden away, allowing teams to focus on application development rather than infrastructure management.
Resource allocation and scaling: Kubernetes requires careful resource allocation and scaling decisions to ensure that PostgreSQL has sufficient CPU, memory, and storage. Properly sizing these resources can be challenging and may require continuous adjustments as workload patterns change. Managed services typically handle this scaling transparently and can automatically adjust based on demand.
Data integrity and high availability: PostgreSQL deployments need robust strategies for data integrity and high availability. Kubernetes can facilitate high availability through pod replicas and distributed deployments, but ensuring data consistency and durability across database instances and search indexes requires careful consideration and often additional tooling.
Performance: Kubernetes networking and storage configurations can introduce performance overhead compared to native cloud services. For latency-sensitive applications or high-throughput workloads, these factors become critical in maintaining optimal performance.
Observability: Troubleshooting issues in a Kubernetes environment, especially related to database and search engine performance, can be complex. Managed services typically come with built-in monitoring, logging, and alerting capabilities tailored to the specific service, making it easier to identify and resolve issues.
Security and compliance: Kubernetes environments require careful attention to security best practices, including network policies, access controls, and encryption. Managed services often come pre-configured with security features and compliance certifications, reducing the burden on teams to implement and maintain these measures.
Authenticate with OCI registry
Helm chart availability
The deprecated Immuta Helm chart (IHC) is not available from ocir.immuta.com.
Copy the snippet below and replace the placeholder text with the credentials provided to you by your customer success manager:
Create a container registry pull secret. Your credentials to authenticate with ocir.immuta.com can be viewed in your user profile at support.immuta.com.
ALTERROLE immuta SET search_path TO bometadata,public;
Enable the pgcrypto extension.
CREATE EXTENSION pgcrypto;
Type \q then press Enter to exit.
Install Immuta
This section demonstrates how to deploy Immuta using the Immuta Enterprise Helm chart once the prerequisite local services are configured.
Create a Helm values file named immuta-values.yaml with the following content:
global:imageRegistry:ocir.immuta.comimagePullSecrets: - name:immuta-oci-registryimageRepositoryMap:immuta/immuta-service:stable/immuta-serviceimmuta/immuta-db:stable/immuta-dbimmuta/immuta-fingerprint:stable/immuta-fingerprintimmuta/audit-service:stable/audit-serviceimmuta/audit-export-cronjob:stable/audit-export-cronjobimmuta/classify-service:stable/classify-serviceimmuta/cache:stable/cacheaudit:enabled:falsesecure:ingress:enabled:falseextraEnvVars: - name:FeatureFlag_AuditServicevalue:"false" - name:FeatureFlag_detectvalue:"false" - name:FeatureFlag_auditLegacyViewHidevalue:"false"postgresql:# Each Kubernetes Service has a DNS record associated with it. See: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/# The anatomy of a domain name is as follows:# <service>.<namespace>.svc.<cluster-domain>## Where the default cluster domain is: cluster.localhost:pg-db-postgresql.immuta.svc.cluster.localport:5432database:immutausername:immutapassword:<postgres-password>ssl:true