Kubernetes using Helm

Create namespace

We recommend using a namespace other than default to deploy applications in production for reasons like isolation, access management, upgrade management, and overall logical separation of default Kubernetes elements and overall aid in long-term management.

kubectl create namespace ennote-onetime

Create Kubernetes secret

You have to generate secret key and initialization vector:

curl -H "Content-Type: application/json" 'https://api.ennote.dev/generate/onetime/secrets'
Outputs example:

{ "secretKey": "eHts9g5AASdkd63pNtSK0ERcg6nwoQEXcR99pLnYBn4=", "initializationVector": "BaT8jIP+PZ5m95eH" }

Create secret file which will be imported to Kubernetes secret

secret

SECRET_KEY= INITIALIZATION_VECTOR=

Parameters
Variable Description
SECRET_KEY A key, in the context of symmetric cryptography, is something you keep secret. Anyone who knows your key (or can guess it) can decrypt any data you've encrypted with it (or forge any authentication codes you've calculated with it, etc.).
INITIALIZATION_VECTOR An IV or initialization vector is, in its broadest sense, just the initial value used to start some iterated process. The term is used in a couple of different contexts and implies different security requirements in each of them.

Create Kubernetes secret from secret file above in custom namespace ennote-onetime

kubectl create secret generic ennote-onetime --from-env-file=secret -n ennote-onetime

Add the Ennote Helm repository

helm repo add ennote https://charts.ennote.dev

Update all the repositories to ensure helm is aware of the latest versions.

helm repo update

Configure custom parameters for helm charts

All values are available in helm chart repository

Create the ennote-onetime-values.yml file

ennote-onetime-values.yml

# Custom values for ennote-onetime-c. # This is a YAML-formatted file. # Declare name/value pairs to be passed into your templates. # name: value namespaceOverride: ennote-onetime #Name of your client customerName: Default image:   repo: registry.ennote.dev/ennote/onetime-c   tag: latest   pullPolicy: Always secret:   name: ennote-onetime

Parameters
Variable Description Default
namespaceOverride Namespace where application will be deployed default
customerName Name of your client Default
image.repo Image repository registry.ennote.dev/ennote/onetime-c
image.tag Image tag version (see section Release Notes) latest
image.pullPolicy The imagePullPolicy for a container and the tag of the image affect when the kubelet attempts to pull (download) the specified image. Always
secret.name Kubernetes secret name ennote-onetime

Install application

Install the latest version of the ennote-onetime-c Helm chart with parameters ennote-onetime-values.yml applied.

helm install -f ennote-onetime-values.yml ennote-onetime ennote/ennote-onetime-c