- Kublr 1.20.1+
- Kubernetes 1.19+
- AWS and/or Azure account
kubectl
1.19+jq
curl
bash
You can follow this demo implementing steps manually based on the instructions below, or just by running
the scripts in the hacks/
directory. The script may also provide useful insight and code templates for
your own automation implementations.
The scripts are written in bash and assume that you have kubectl
, jq
, and curl
tools available on the
command path.
If you are planning to use the scripts, run . devops-demo/hacks/00-prep-env.sh
first.
Check the script output for the instructions on adjusting it to your configuration, and re-run with correct
parameters and environment variables set.
This project includes 2 cluster specifications that can be used almost without modifications (see below
for the required changes in the specs) to deploy the environment in AWS us-east-1
region and Azure
eastus
region.
Use an existing Kublr Control Plane to deploy the cluster(s) using one of the specs in the env
directory - ambassador-demo-us-east-1.yaml
, or ambassador-demo-eastus.yaml
.
-
The clusters are deployed into
default
Kublr space. You can use a different space, but then you will need to update it in the cluster specs you are using. -
For AWS cluster: create an AWS secret named
aws
in the space. -
For Azure cluster: create an Azure secret named
azure
and a public SSH key secret namedssh-pub
in the space. -
Start creating a new cluster in Kublr UI, click "Customize specification" and replace yaml in the dialog that opens with one of the provided specifications.
Some of the other parameters that MAY be changed:
-
If you want to use a different space in Kublr rather than
default
, change the space in L4 -
If you want to use a different AWS region and availability zones:
-
Change the region in L10
-
Change EFS Mount Targets in L19-L24
Here most importantly the designations of target subnets must be changed according to the AZs used.
Kublr uses AZ numbering convention where AZs ending with
a
(e.g.us-east-1a
) are numbered0
,b
-1
,c
-2
etc. Therefore if you want to use, for example, AZsus-west-2c
, then the Mount Target name(s) should be changed toDevOpsDemoEFSMT2
in the spec line L19, correspondingly, and the subnet name(s) should beSubnetNodePublic2
in the spec line L24, correspondingly.
-
Other possible variation points that you may or may not want to modify or experiment with:
- AMIs or Azure images used
- instance types
- the size of the cluster
When clusters are deployed and functional you can either use Kublr UI to download kubeconfig files locally, or use the provided scripts.
Set environment variables that specify access to your Kublr Control Plane:
export KCP_URL=https://my-kcp.example.com
export KCP_USERNAME=admin
export KCP_PASSWORD='***'
. scripts/00-prep.sh
Run script to download the kuubeconfig files:
./scripts/15-get-kubeconfig.sh
Verify that you can connect to the cluster(s):
kubectl --context=ambassador-demo-eastus get nodes
kubectl --context=ambassador-demo-us-east-1 get nodes