Skip to main content

Kubernetes Installation

This section shows how to setup mID Provider using Helm Chart.

Prerequisites

Ensure your Prerequisites installation using following commands

Kubernetes

kubectl version --client

Above command will result something like below

Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-21T14:51:23Z", GoVersion:"go1.14.3", Compiler:"gc", Platform:"darwin/amd64"}

Helm

helm version

Above command will result something like below

version.BuildInfo{Version:"v3.6+unreleased", GitCommit:"efe2638f87b597403f34009e1029a6f0b44db8f2", GitTreeState:"clean", GoVersion:"go1.16.6"}

Installing the Chart

To install the chart with the release name my-release

$ helm repo add kobil https://charts.kobil.com --username <USERNAME> --password <PASSWORD>
$ helm repo update

Install Redis

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm repo update
$ export REDIS_PASSWORD=<PASS>

$ helm install idp-redis \
--set auth.password=$REDIS_PASSWORD \
bitnami/redis

Install Docker registry pull secrets

$ kubectl create secret docker-registry registry-secret --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> 

Install TLS certificates

$ kubectl create secret tls idp-ingress-tls --cert=path/to/cert/file --key=path/to/key/file

Prepare base64 values for certs/keys/truststores

$ base64 -i <filename>

Install Keycloak

$ helm install -f <path/to/custom/values.yaml> RELEASE-NAME kobil/idp \
--version <CHART_VERSION> \
--set ssms.redis.host=idp-redis-master

Install Ingress Controller

$  helm install RELEASE-NAME ingress-nginx/ingress-nginx \
--set controller.service.externalIPs={"EXTERNAL_IP"} \
--set controller.service.type="ClusterIP"

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

Configuration

ParameterDescriptionDefault
global.imagePullSecretsGlobal Docker registry secret names as an array[registry-secret]
global.logging.levelGlobal log level affecting multiple services. Possible values are INFO, WARN, DEBUG, ERROR]INFO
global.ingress.enabledDeploy ingress resourcestrue
global.ingress.classIngress class name used by the ingress controllernginx
global.ingress.domainDomain name for mPoweridp.local
global.ingress.sslRedirectDetermines if http requests to idp services are automatically redirected to https.true
global.idp.adminUser.usernameIDP admin username. Used for UI access https://master.api.{{.Values.global.ingress.domain}}/auth and https://master.dashboard.{{.Values.global.ingress.domain}}admin
global.idp.adminUser.passwordIDP admin password.password
ingress.tlsSecretName of TLS Secret for domains api.{{.Values.global.ingress.domain}} and *.api.{{.Values.global.ingress.domain}}ipd-ingress-tls
ssms.cloudPooler.replicasNumber of replicas for cloud pooler1
ssms.cloudConnector.replicasNumber of replicas for SSMS connector1
gateway.replicasNumber of replicas for API gateway1
appLoginFrontend.enabledDeploy app login frontend. Used for token based login.true
appLoginFrontend.ingress.tlsSecretName of TLS Secret for domain applogin.{{.Values.global.ingress.domain}}mpower-ingress-tls
appLoginFrontend.replicasNumber of replicas for app login frontend1
keycloak.umaUseInternalUrlControls if UMA tickets are requested from internal or external URL.false
keycloak.replicasNumber of replicas for Keycloak1
keycloak.hpa.enabledEnable deployment of HPA.false
keycloak.hpa.minReplicasMinimum number of replicas when using HPA2
keycloak.hpa.maxReplicasMaximum number of replicas when using HPA4
keycloak.env.defaultThemeTheme to use for login pageskobilv2
keycloak.env.welcomeThemeTheme to use for welcome pagekobil
keycloak.db.ensurePostgresDBAutocreate database required for keycloak. Only postgres is supported. Provided user must have sufficient rights.false
keycloak.db.vendorDatabase type. Supported values are postgres and oraclepostgres
keycloak.db.hostDatabase hostnamepostgres
keycloak.db.portDatabase port5432
keycloak.db.databaseDatabase nameiam_db
keycloak.db.userDatabase userpostgres
keycloak.db.passwordDatabase passwordpassword
keycloak.themesAdditional themes as an array.nil

Default values.yaml file for idp installation that can be modified/overridden

nameOverride: ""
fullnameOverride: ""

global:
imagePullSecrets:
- registry-secret

ingress:
enabled: true
class: nginx
domain: idp.local
sslRedirect: true

logging:
level: INFO

idp:
adminUser:
username: "admin"
password: "password"

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

disableSSL: "true"
enableTenant: "true"
enableTlsClientAuth: false

gateway:
replicas: 1
image: bitnami/nginx:1.20.1
startupProbe:
periodSeconds: 10
failureThreshold: 40
livenessProbe:
initialDelaySeconds: 20
periodSeconds: 10
failureThreshold: 3
timeoutSeconds: 5
readinessProbe:
initialDelaySeconds: 25
periodSeconds: 10
failureThreshold: 3
timeoutSeconds: 5
resources:
requests:
memory: "50Mi"
cpu: "50m"
limits:
memory: "2Gi"
cpu: "1"
keys:
dhparam: ""
sslCrt: ""
sslKey: ""
caCrt: ""

ssms:
truststore: ""

cloudPooler:
logging:
#Supported values are: ALL, INFO, WARN, ERROR
level: INFO
replicas: 1
image: kobilsystems.azurecr.io/idp/ssms-pooler:2.2.0
livenessProbe:
initialDelaySeconds: 20
periodSeconds: 10
failureThreshold: 1
timeoutSeconds: 5
resources:
requests:
memory: "200Mi"
cpu: "50m"
limits:
memory: "2Gi"
cpu: "1"

cloudConnector:
logging:
#Supported values are: ALL, INFO, WARN, ERROR
level: INFO
replicas: 1
image: kobilsystems.azurecr.io/idp/ssms-connector:2.2.0
livenessProbe:
initialDelaySeconds: 40
periodSeconds: 15
failureThreshold: 2
timeoutSeconds: 5
resources:
requests:
memory: "550Mi"
cpu: "50m"
limits:
memory: "3Gi"
cpu: "1"
keystore: ""

svc:
hostname: ssms-services
mgt:
hostname: ssms-management

redis:
host: idp-redis
port: 6379
password: "password"


appLoginFrontend:
enabled: true
replicas: 1
ingress:
tlsSecret: applogin-ingress-tls
hostLabel: applogin
image: kobilsystems.azurecr.io/idp/preface:1.1.1
resources:
requests:
memory: "50Mi"
cpu: "50m"
limits:
memory: "2Gi"
cpu: "1"
defaultTenantName: ''
profileSubdomain: "profile"

keycloak:
# Controls if UMA tickets are requested from internal or external URL.
# Using internal URL improves performance, since requests don't go
# through reverse proxy. Before setting to true, ensure that setting
# `issuerUrls: https://{realm}.{{ .Values.ingress.hostLabel }}.{{ .Values.global.ingress.domain }}/auth/realms/{realm}`
# is applied in MASTER realm settings. E.g. `issuerUrls: https://{realm}.api.example.com/auth/realms/{realm}`
umaUseInternalUrl: false
terminationGracePeriodSeconds: 60
logging:
#Supported values are ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE and WARN.
level: INFO
replicas: 1
#Supported values are jdbc,dns
jgroupsDiscoveryProtocol: "jdbc"
image: kobilsystems.azurecr.io/idp/core:1.28.2
resources:
requests:
memory: "1600Mi"
cpu: "800m"
limits:
memory: "2Gi"
cpu: "1"
init:
image: kobilsystems.azurecr.io/idp/themes:1.0.2
clients:
admin:
id: admin-cli
env:
defaultTheme: "kobil"
duplicateUserCheck: "false"
welcomeTheme: "kobil"
loginTokenLength2FA: "8"
# Possible values are id, name, digitaniumUserId
defaultUserId: "id"
mPayUrl: ""
db:
ensurePostgresDB: false
host: "hostname"
database: "iam_db"
password: "password"
port: "5432"
user: "postgres"
vendor: "postgres"
keystore: ""



basepath: auth

livenessProbe:
initialDelaySeconds: 300
timeoutSeconds: 5
readinessProbe:
initialDelaySeconds: 30
timeoutSeconds: 1
hpa:
enabled: false
minReplicas: 2
maxReplicas: 4
cpu:
averageUtilization: 95
scaleUp:
stabilizationWindowSeconds: 0
periodSeconds: 300
scaleDown:
stabilizationWindowSeconds: 300
periodSeconds: 300
tuning:
io:
worker:
ioThreads: 128
taskKeepalive: 120000
taskMaxThreads: 2048
bufferPool:
bufferSize: 16384
buffersPerSlice: 128
directBuffers: true
datasources:
dataSource:
statisticsEnabled: true
minPoolSize: 10
maxPoolSize: 50
poolPrefill: false
poolUseStrictMin: false
idleTimeoutMinutes: 30
cache:
# https://www.keycloak.org/docs/latest/server_installation/#cache
# https://www.keycloak.org/docs/latest/server_installation/#cache-configuration
# ownersCount caches- sessions, loginFailures, clientSessions, offlineSessions, offlineClientSessions, actionTokens
# ownersAuthSessionCount caches- authenticationSessions
ownersCount: 2
ownersAuthSessionCount: 1
ingress:
tlsSecret: idp-ingress-tls
hostLabel: api