Immuta Installation on k3s in Air Gapped environment

triangle-exclamation

Gathering Artifacts

Gather k3s, Elasticsearch, PostgreSQL and Immuta artifacts necessary for transfer to the destination network. This list is not intended to be exhaustive but is a decent minimal option. There are alternatives for Kubernetes, Elasticsearch and PostgreSQL that are not covered here that may suit individual use cases better.

Gathering k3s Artifacts

K3S_RELEASE=v1.30.3%2Bk3s1
wget -qO k3s-install.sh https://get.k3s.io
wget -q https://github.com/k3s-io/k3s/releases/download/${K3S_RELEASE}/k3s-airgap-images-amd64.tar.zst
wget -q https://github.com/k3s-io/k3s/releases/download/${K3S_RELEASE}/k3s

Gathering Elasticsearch Artifacts

circle-info

The docker pull and docker save commands are used here in lieu of other commands like skopeo in order to easily preserve the container name/tag format for import into containerd.

ECK_VERSION=2.14.0
ELASTIC_VERSION=8.15.0

helm repo add elastic https://helm.elastic.co
helm pull elastic/eck-operator
docker pull docker.elastic.co/eck/eck-operator:${ECK_VERSION} 
docker save docker.elastic.co/eck/eck-operator:${ECK_VERSION} > eck-operator-image-${ECK_VERSION}.tar
docker pull docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION} 
docker save docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION} > elasticsearch-${ELASTIC_VERSION}.tar

Gathering PostgreSQL Artifacts

Gathering Immuta Artifacts

Artifacts to be transferred to air gapped network

Transfer the files gathered in previous steps along with the additional files included at the bottom of this section to the air gapped deployment network. An example of this list is included for reference:

file-download
183B
file-download
1KB

Deploying Kubernetes

Copy the k3s airgap images to the correct destination and run the install setting the option to bypass downloads:

Validating the installation

Example of a sucessful deployment pod list:

Importing images to embedded k3s registry

Load the images into the embeded registry using the containerd cli:

Example output

circle-info

This process can take some time depending on environment conditions

Installing Elasticsearch

Install the ECK operator into its own namespace and then create a single pod Elasticsearch cluster in the Immuta namespace:

Validating Elasticsearch

Get the password that was generated for the elastic user and validate connectivity to Elasticsearch with curl:

Installing PostgreSQL

Install the Postgres Operator in its own namespace with helm:

Install a postgres cluster in the Immuta namespace:

Validating PostgreSQL

Forward the Postgres port back to the localhost:

Connect to the Postgres cluster by getting relevant connection string information from kubernetes secrets:

Configure the database for use with Immuta:

Installing Immuta

circle-info

Note that special characters need to be percent encoded in the postgresql connection string as described here: https://www.prisma.io/dataguide/postgresql/short-guides/connection-uris#percent-encoding-valuesarrow-up-right

Edit the immuta-values.yaml file template provided in the artifact gathering and transfer sections with the correct PostgreSQL and Elasticsearch credentials and then install with:

Validating Immuta

Forward the immuta-secure service port back to the localhost and validate connectivity. This can also be accessed via a web browser if the destination machine is not headless. Firewall ports may need to be opened otherwise:

Complete pod list post installation

This is an example of the running pods list after Immuta and dependent services are deployed:

Last updated