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:
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.