Skip to main content

I have this folder structure:

ifsroot1

fsroot2

ifsroot3

for different installations. I do not fancy that part from the help file:

Place the config file to its default location

The default path for the kubeconfig file is c:\user\<YourUser>\.kube\config. Copy the file ifsroot\config\kube\config to c:\user\<YourUser>\.kube folder

 

since I need to do it every single time I decide to use ifsroot1, 2 or 3.

This part seems cleaner in my view as you don’t risk to have unintended config file:

Powershell

ps> $env:KUBECONFIG = "ifsroot\config\kube\config"  

Cmd

cmd> set KUBECONFIG=ifsroot\config\kube\config

 

But what about --kubeconfig directive?. It is simply not accepted by the installer despite of this info:

https://docs.ifs.com/techdocs/21r2/020_installation/200_installing_ifs_cloud/035_ifs_cloud_ifsinstaller/040_installer_directives/

So I run it like this:

PS C:\Temp\Cloud\ifsroot0\deliveries\build-home\ifsinstaller> .\installer.ps1 --values ..\..\..\config\ifscloud-values.yaml --values solutionset.yaml --set dbInstaller.sysPassword=xxxxx --kubeconfig ..\..\..\config\kube\config

 

pThu Feb 17 12:31:49 GMT 2022] - INFO: Checking if helm is installed..
lThu Feb 17 12:31:49 GMT 2022] - SEVERE: Helm not installed
aThu Feb 17 12:31:49 GMT 2022] - SEVERE: 'helm' is not recognized as an internal or external command,
operable program or batch file.

iThu Feb 17 12:31:49 GMT 2022] - INFO: Checking if kubectl is installed..
lThu Feb 17 12:31:49 GMT 2022] - INFO: kubectl installed..
lThu Feb 17 12:31:49 GMT 2022] - INFO: chartVersion not found in properties, using buildHomeVersion: 211.3.0
1Thu Feb 17 12:31:49 GMT 2022] - INFO: Using existing certificate
iThu Feb 17 12:31:50 GMT 2022] - INFO: Generating symmetric-key. This will only be persisted if the secret, 'symmetric-key' does not exist.
xThu Feb 17 12:31:50 GMT 2022] - INFO: Creating namespace
sThu Feb 17 12:31:50 GMT 2022] - SEVERE: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
oThu Feb 17 12:31:50 GMT 2022] - SEVERE: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
oThu Feb 17 12:31:50 GMT 2022] - SEVERE: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
oThu Feb 17 12:31:50 GMT 2022] - SEVERE: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
oThu Feb 17 12:31:50 GMT 2022] - SEVERE: Failed to create namespace
sThu Feb 17 12:31:50 GMT 2022] - SEVERE: Failed to install ifs-cloud. Collected logs from command:
DEBUG:    1+ if ($env:verbose) { Set-PSDebug -Trace 2; >>>> $DebugPreference = "Continue"}
DEBUG:     ! SET $DebugPreference = 'Continue'.
DEBUG:    2+  >>>> $arg=$argsg0]
DEBUG:     ! SET $arg = 'dryrun'.
DEBUG:    4+ if ( >>>> "$env:namespace" -eq "") {
DEBUG:    9+ if ( >>>> "$arg" -eq "delete")  {
DEBUG:   17+  >>>> kubectl $env:kubeconfigFlag get namespace $env:namespace -o name *> $null
DEBUG:   18+ if ( >>>> !$?) {
DEBUG:   19+    >>>> write-host INFO: Creating namespace
INFO: Creating namespace
DEBUG:   20+    >>>> kubectl $env:kubeconfigFlag create namespace $env:namespace
Error: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
DEBUG:   21+    >>>> kubectl $env:kubeconfigFlag label namespace $env:namespace app.kubernetes.io/managed-by=Helm
Error: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
DEBUG:   22+    >>>> kubectl $env:kubeconfigFlag annotate namespace $env:namespace meta.helm.sh/release-name=ifs-cloud
Error: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
DEBUG:   23+    >>>> kubectl $env:kubeconfigFlag annotate namespace $env:namespace
meta.helm.sh/release-namespace=$env:namespace
Error: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
DEBUG:   24+   if ( >>>> !$?) {write-host SEVERE: Failed to create namespace;exit 1}
DEBUG:   24+   if (!$?) { >>>> write-host SEVERE: Failed to create namespace;exit 1}
SEVERE: Failed to create namespace
DEBUG:   24+   if (!$?) {write-host SEVERE: Failed to create namespace; >>>> exit 1}

cThu Feb 17 12:31:50 GMT 2022] - SEVERE: Validation failed.

 

BTW, this is still R1.

Just to show, that helm is instaled:

PS C:\Temp\Cloud\ifsroot0\deliveries\build-home\ifsinstaller> .\installer.ps1 --values ..\..\..\config\ifscloud-values.yaml --values solutionset.yaml --set dbInstaller.sysPassword=xxxx --kubeconfig ..\..\..\config\kube\config
[Thu Feb 17 13:33:15 GMT 2022] - INFO: Checking if helm is installed..
[Thu Feb 17 13:33:19 GMT 2022] - INFO: Helm installed
[Thu Feb 17 13:33:19 GMT 2022] - INFO: Checking if kubectl is installed..
[Thu Feb 17 13:33:19 GMT 2022] - INFO: kubectl installed..
[Thu Feb 17 13:33:19 GMT 2022] - INFO: ======================
[Thu Feb 17 13:33:19 GMT 2022] - INFO: ACTIVE KUBECTL CONFIG
[Thu Feb 17 13:33:19 GMT 2022] - INFO: apiVersion: v1
[Thu Feb 17 13:33:19 GMT 2022] - INFO: clusters:
[Thu Feb 17 13:33:19 GMT 2022] - INFO: - cluster:
[Thu Feb 17 13:33:19 GMT 2022] - INFO:     certificate-authority-data: DATA+OMITTED
/Thu Feb 17 13:33:19 GMT 2022] - INFO:     server: https://10.24.5.151:16443
rThu Feb 17 13:33:19 GMT 2022] - INFO:   name: microk8s-cluster
bThu Feb 17 13:33:19 GMT 2022] - INFO: contexts:
bThu Feb 17 13:33:19 GMT 2022] - INFO: - context:
bThu Feb 17 13:33:19 GMT 2022] - INFO:     cluster: microk8s-cluster
rThu Feb 17 13:33:19 GMT 2022] - INFO:     user: admin
mThu Feb 17 13:33:19 GMT 2022] - INFO:   name: microk8s
oThu Feb 17 13:33:19 GMT 2022] - INFO: current-context: microk8s
oThu Feb 17 13:33:19 GMT 2022] - INFO: kind: Config
nThu Feb 17 13:33:19 GMT 2022] - INFO: preferences: {}
:Thu Feb 17 13:33:19 GMT 2022] - INFO: users:
eThu Feb 17 13:33:19 GMT 2022] - INFO: - name: admin
dThu Feb 17 13:33:19 GMT 2022] - INFO:   user:
uThu Feb 17 13:33:19 GMT 2022] - INFO:     password: c0g1TzBRcG1zemJzSHA4ejd2N3k4OXhxcXFzU3RmMUp4cVZDN3BiSko0QT0K
kThu Feb 17 13:33:19 GMT 2022] - INFO:     username: admin
mThu Feb 17 13:33:19 GMT 2022] - INFO: ======================
=Thu Feb 17 13:33:19 GMT 2022] - INFO: chartVersion not found in properties, using buildHomeVersion: 211.3.0
:Thu Feb 17 13:33:19 GMT 2022] - INFO: Using existing certificate
rThu Feb 17 13:33:20 GMT 2022] - INFO: Generating symmetric-key. This will only be persisted if the secret, 'symmetric-key' does not exist.
oThu Feb 17 13:33:20 GMT 2022] - INFO: Creating namespace
nThu Feb 17 13:33:20 GMT 2022] - SEVERE: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
bThu Feb 17 13:33:20 GMT 2022] - SEVERE: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
bThu Feb 17 13:33:21 GMT 2022] - SEVERE: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
bThu Feb 17 13:33:21 GMT 2022] - SEVERE: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
bThu Feb 17 13:33:21 GMT 2022] - SEVERE: Failed to create namespace
nThu Feb 17 13:33:21 GMT 2022] - SEVERE: Failed to install ifs-cloud. Collected logs from command:
DEBUG:    1+ if ($env:verbose) { Set-PSDebug -Trace 2; >>>> $DebugPreference = "Continue"}
DEBUG:     ! SET $DebugPreference = 'Continue'.
DEBUG:    2+  >>>> $arg=$argsg0]
DEBUG:     ! SET $arg = 'dryrun'.
DEBUG:    4+ if ( >>>> "$env:namespace" -eq "") {
DEBUG:    9+ if ( >>>> "$arg" -eq "delete")  {
DEBUG:   17+  >>>> kubectl $env:kubeconfigFlag get namespace $env:namespace -o name *> $null
DEBUG:   18+ if ( >>>> !$?) {
DEBUG:   19+    >>>> write-host INFO: Creating namespace
INFO: Creating namespace
DEBUG:   20+    >>>> kubectl $env:kubeconfigFlag create namespace $env:namespace
Error: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
DEBUG:   21+    >>>> kubectl $env:kubeconfigFlag label namespace $env:namespace app.kubernetes.io/managed-by=Helm
Error: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
DEBUG:   22+    >>>> kubectl $env:kubeconfigFlag annotate namespace $env:namespace meta.helm.sh/release-name=ifs-cloud
Error: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
DEBUG:   23+    >>>> kubectl $env:kubeconfigFlag annotate namespace $env:namespace
meta.helm.sh/release-namespace=$env:namespace
Error: flags cannot be placed before plugin name: --kubeconfig ..\..\..\config\kube\config
DEBUG:   24+   if ( >>>> !$?) {write-host SEVERE: Failed to create namespace;exit 1}
DEBUG:   24+   if (!$?) { >>>> write-host SEVERE: Failed to create namespace;exit 1}
SEVERE: Failed to create namespace
DEBUG:   24+   if (!$?) {write-host SEVERE: Failed to create namespace; >>>> exit 1}

Thu Feb 17 13:33:21 GMT 2022] - SEVERE: Validation failed.
PS C:\Temp\Cloud\ifsroot0\deliveries\build-home\ifsinstaller>