When deploying the multicluster gateway controller using the make targets, the following will be created:
- Kind cluster(s)
- Gateway API CRDs in the control plane cluster
- Ingress controller
- Cert manager
- ArgoCD instance
- K8s Dashboard
- LetsEncrypt certs
- AWS
- Kind
make kind
- yq
make yq
- openssl>=3
- On macos a later version is available with
brew install openssl
. You'll need to update your PATH as macos provides an older version via libressl as well - On fedora use
dnf install openssl
- On macos a later version is available with
- go >= 1.20
-
Create env files:
- One called
aws-credentials.env
containing AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_REGION - One called
controller-config.env
containing AWS_DNS_PUBLIC_ZONE_ID and ZONE_ROOT_DOMAIN
- One called
-
Setup your local environment
make local-setup MGC_WORKLOAD_CLUSTERS_COUNT=<NUMBER_WORKLOAD_CLUSTER>
-
Build the controller image and load it into the control plane
kubectl config use-context kind-mgc-control-plane make kind-load-controller
-
Deploy the controller to the control plane cluster
make deploy-controller
-
(Optional) View the logs of the deployed controller
kubectl logs -f $(kubectl get pods -n multi-cluster-gateways | grep "mgc-" | awk '{print $1}') -n multi-cluster-gateways
-
Create env files:
- One called
aws-credentials.env
containing AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_REGION - One called
controller-config.env
containing AWS_DNS_PUBLIC_ZONE_ID and ZONE_ROOT_DOMAIN
- One called
-
Setup your local environment
make local-setup MGC_WORKLOAD_CLUSTERS_COUNT=<NUMBER_WORKLOAD_CLUSTER>
-
Run the controller locally:
kubectl config use-context kind-mgc-control-plane (export $(cat ./controller-config.env | xargs) && export $(cat ./aws-credentials.env | xargs) && make build-controller install run-controller)
-
Build the agent image and load it into the workload cluster
kubectl config use-context kind-mgc-workload-1 make kind-load-agent
-
Deploy the agent to the workload cluster
make deploy-agent
- Target the workload cluster you wish to run on:
export KUBECONFIG=./tmp/kubeconfigs/mgc-workload-1.kubeconfig
- Run the agent locally:
make build-agent run-agent
Copyright 2022 Red Hat.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.