File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ Run these two commands to pull in all the required dependencies and set the appr
10
10
11
11
Linux:
12
12
```
13
- ./linux/setup_k8s.sh
14
13
export KUBECONFIG = "/path/to/your/anon.conf"
14
+ ./linux/setup_k8s.sh
15
15
```
16
16
17
17
Windows PowerShell (elevated permissions required, so run as admin):
18
18
```
19
- .\windows\setup_k8s.ps1
20
19
$env:KUBECONFIG = "C:\path\to\your\anon.conf"
20
+ .\windows\setup_k8s.ps1
21
21
```
22
22
23
23
Refer to https://kubernetes.io/docs/tasks/tools/ if you would rather install kubectl manually.
Original file line number Diff line number Diff line change 6
6
7
7
echo " Starting Kubernetes setup..."
8
8
9
- if [ ! -f " anon.conf" ]; then
10
- echo " Please download anon.conf from the AMD OSSCI confluence site to get started"
9
+ # Exit early if KUBECONFIG is not set to a valid path
10
+ if [ -z " $KUBECONFIG " ]; then
11
+ echo " KUBECONFIG is not set or empty. Exiting"
12
+ echo " Please download the authentication file from the AMD OSSCI confluence site and set KUBECONFIG env variable to the file path"
11
13
echo " You will need this auth file to access the k8s cluster"
12
14
exit 1
15
+ elif [ ! -f " $KUBECONFIG " ]; then
16
+ echo " File $KUBECONFIG does not exit. Exiting"
17
+ echo " Plese make sure the KUBECONFIG env variable is correctly set to the authentication file path"
18
+ exit 1
19
+ else
20
+ echo " KUBECONFIG is set to: $KUBECONFIG "
13
21
fi
14
22
15
23
echo " Downloading kubectl..."
You can’t perform that action at this time.
0 commit comments