UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 66e73f3a authored by Danny Gershman's avatar Danny Gershman :lock: Committed by Micah Nagel
Browse files

Override k8s version for k3d

parent a939d458
No related branches found
No related tags found
1 merge request!2648Override k8s version for k3d
......@@ -434,6 +434,12 @@ k3d_command+=" --k3s-arg \"--disable=traefik@server:0\" --k3s-arg \"--disable=m
# Port mappings to support Istio ingress + API access
k3d_command+=" --port 80:80@loadbalancer --port 443:443@loadbalancer --api-port 6443"
K3S_IMAGE_TAG=${K3S_IMAGE_TAG:=""}
if [[ ! -z "$K3S_IMAGE_TAG" ]]; then
echo "Using custom K3S image tag $K3S_IMAGE_TAG..."
k3d_command+=" --image docker.io/rancher/k3s:$K3S_IMAGE_TAG"
fi
# Add MetalLB specific k3d config
if [[ "$METAL_LB" == true ]]; then
# create docker network for k3d cluster
......
......@@ -58,18 +58,28 @@ k3d-dev.sh -b -p -m -d -h
The script uses the default AWS profile and defaults the VPC id and AMI id.
To change this default behavior you can export environment variables before running the script.
Run the script with a specific AWS profile by first exporting the AWS_PROFILE environment variable
Run the script with a specific AWS profile by first exporting the AWS_PROFILE environment variable:
```shell
export AWS_PROFILE=my-aws-profile
```
To run the script with a specific VPC
To run the script with a specific VPC:
```shell
export VPC_ID=vpc-XXXXXXXXXXXX
```
To run the script with a specific AMI
To run the script with a specific AMI:
```shell
export AMI_ID=ami-XXXXXXXXXX
```
To specify a specific Kubernetes version (the eligible choices are [here](https://hub.docker.com/r/rancher/k3s/tags)):
```shell
export K3S_IMAGE_TAG=sometag
```
You can also run these inline with the script, without exporting them to your environment. Example:
```shell
K3S_IMAGE_TAG=v1.24.12-k3s1 ./docs/assets/scripts/developer/k3d-dev.sh
```
## After Running The Script
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment