- For API Gateway to work, the Istio module must be installed in the cluster.
- Access to a Kubernetes cluster (you can use k3d)
- kubectl
- kubebuilder
- Docker
- Kyma CLI
-
Clone the project.
git clone https://github.com/kyma-project/api-gateway.git && cd api-gateway
-
Set the API Gateway Operator image name.
export IMG=api-gateway-operator:0.0.1 export K3D_CLUSTER_NAME=kyma
-
Provision the k3d cluster.
k3d registry create kyma-registry --port 5001 k3d cluster create kyma --kubeconfig-switch-context -p 80:80@loadbalancer -p 443:443@loadbalancer --registry-use kyma-registry --k3s-arg "--disable=traefik@server:0" kubectl create ns kyma-system
TIP: To verify the correctness of the project, build it using the
make build
command. -
Build the image.
make docker-build
-
Push the image to the registry.
k3d
k3d image import $IMG -c $K3D_CLUSTER_NAME
Globally available Docker registry
make docker-push
-
Create the
kyma-system
namespace and deploy API Gateway Operator in it.make deploy
-
If you're using k3d, update Core DNS to correctly resolve the
local.kyma.dev
domain.
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: coredns-custom
namespace: kube-system
data:
kyma.override: |
rewrite name regex (.*)\.local\.kyma\.dev istio-ingressgateway.istio-system.svc.cluster.local
EOF
kubectl rollout restart deployment -n kube-system coredns