From 74c8d2dc161b3056abcb8a8f2982121704a7d05c Mon Sep 17 00:00:00 2001 From: R-Lawton Date: Fri, 20 Dec 2024 12:30:18 +0000 Subject: [PATCH] remove old install k8s doc Signed-off-by: R-Lawton --- doc/install/install-kubernetes.md | 209 ------- doc/install/install-make.md | 3 - doc/install/mtls-configuration.md | 4 +- .../secure-protect-connect.md | 532 ++++++++++++++++++ 4 files changed, 534 insertions(+), 214 deletions(-) delete mode 100644 doc/install/install-kubernetes.md create mode 100644 doc/user-guides/full-walkthrough/secure-protect-connect.md diff --git a/doc/install/install-kubernetes.md b/doc/install/install-kubernetes.md deleted file mode 100644 index da3246686..000000000 --- a/doc/install/install-kubernetes.md +++ /dev/null @@ -1,209 +0,0 @@ -# Install Kuadrant on a Kubernetes cluster - -!!! note - You must perform these steps on each Kubernetes cluster where you want to use Kuadrant. - -!!! warning - - Kuadrant uses a number of labels to search and filter resources on the cluster. - All required labels are formatted as `kuadrant.io/*`. - Removal of any labels with the prefix may cause unexpected behaviour and degradation of the product. - - -## Prerequisites - -- Access to a Kubernetes cluster, with `kubeadmin` or an account with similar permissions -- `cert-manager` [installed](https://cert-manager.io/docs/installation/) - -## Procedure - -This guide will show you how to install Kuadrant onto a bare Kubernetes cluster. - -Alternatively, if you are looking instead for a way to set up Kuadrant locally to evaluate or develop, consider running the kind & Kubernetes [quickstart script](https://docs.kuadrant.io/latest/getting-started-single-cluster/). - -### Install Gateway API - -```bash -kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.1.0/standard-install.yaml -``` - -### Install [OLM](https://olm.operatorframework.io/) - -!!! note - Currently, we recommend installing our operator via OLM. We plan to support Helm soon. - -```bash -curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.28.0/install.sh | bash -s v0.28.0 -``` - -### (Optional) Install Istio as a Gateway API provider - -!!! note - Skip this step if planing to use [Envoy Gateway](https://gateway.envoyproxy.io/) as Gateway API provider - - -There are several ways to install Istio (via `istioctl`, Helm chart or Operator) - this is just an example for starting from a bare Kubernetes cluster. - -```bash -curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.22.5 sh - -./istio-1.22.5/bin/istioctl install --set profile=minimal -./istio-1.22.5/bin/istioctl operator init -kubectl apply -f https://raw.githubusercontent.com/Kuadrant/kuadrant-operator/main/config/dependencies/istio/istio-operator.yaml -``` - -### (Optional) Install Envoy Gateway as a Gateway API provider - -!!! note - Skip this step if planing to use [Istio](https://istio.io/) as Gateway API provider - -There are several ways to install Envoy Gateway (via `egctl`, Helm chart or Kubernetes yaml) - this is just an example for starting from a bare Kubernetes cluster. - -```bash -helm install eg oci://docker.io/envoyproxy/gateway-helm --version v1.1.0 -n envoy-gateway-system --create-namespace -``` - -Kuadrant relies on the Envoy Gateway patch policy feature to function correctly - enable the *EnvoyPatchPolicy* feature like so: - -```bash -TMP=$(mktemp -d) -kubectl get configmap -n envoy-gateway-system envoy-gateway-config -o jsonpath='{.data.envoy-gateway\.yaml}' > ${TMP}/envoy-gateway.yaml -yq e '.extensionApis.enableEnvoyPatchPolicy = true' -i ${TMP}/envoy-gateway.yaml -kubectl create configmap -n envoy-gateway-system envoy-gateway-config --from-file=envoy-gateway.yaml=${TMP}/envoy-gateway.yaml -o yaml --dry-run=client | kubectl replace -f - -kubectl rollout restart deployment envoy-gateway -n envoy-gateway-system -``` - -Wait for Envoy Gateway to become available: - -```bash -kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available -``` - -### Install Kuadrant - -```bash -kubectl create -f https://operatorhub.io/install/kuadrant-operator.yaml -kubectl get crd --watch | grep -m 1 "kuadrants.kuadrant.io" -``` - -### Request a Kuadrant instance - -```bash -kubectl create namespace kuadrant-system -kubectl -n kuadrant-system apply -f - < **Note:** In production environment, these steps are usually performed by a cluster operator with administrator privileges over the Kubernetes cluster. diff --git a/doc/install/mtls-configuration.md b/doc/install/mtls-configuration.md index cad4b59de..556f83fbc 100644 --- a/doc/install/mtls-configuration.md +++ b/doc/install/mtls-configuration.md @@ -12,8 +12,8 @@ At the time of writing there is [an RFC](https://github.com/Kuadrant/architectur ## Prerequisites -You have installed Kuadrant in a [Kubernetes](https://docs.kuadrant.io/latest/kuadrant-operator/doc/install/install-kubernetes/) or [OpenShift](https://docs.kuadrant.io/latest/kuadrant-operator/doc/install/install-openshift/) cluster. -Additionally, you have at least 1 AuthPolicy or RateLimitPolicy attached to your Gateway or HTTPRoute. +- You have installed Kuadrant in a Kubernetes cluster. +- Additionally, you have at least 1 AuthPolicy or RateLimitPolicy attached to your Gateway or HTTPRoute. ## Enabling mTLS diff --git a/doc/user-guides/full-walkthrough/secure-protect-connect.md b/doc/user-guides/full-walkthrough/secure-protect-connect.md new file mode 100644 index 000000000..8d4cf7555 --- /dev/null +++ b/doc/user-guides/full-walkthrough/secure-protect-connect.md @@ -0,0 +1,532 @@ +# Secure, protect, and connect APIs with Kuadrant + +## Overview + +This guide walks you through using Kuadrant to secure, protect, and connect an API exposed by a Gateway (Kubernetes Gateway API) from the personas platform engineer and application developer. For more information on the different personas please see the [Gateway API documentation](https://gateway-api.sigs.k8s.io/concepts/roles-and-personas/#key-roles-and-personas) + +## Prerequisites + +- Have a cluster with Kuadrant operator installed. +- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) command line tool. +- AWS/Azure or GCP with DNS capabilities. + + +### Set the environment variables + +Set the following environment variables used for convenience in this guide: + +```bash +export KUADRANT_GATEWAY_NS=api-gateway # Namespace for the example Gateway +export KUADRANT_GATEWAY_NAME=external # Name for the example Gateway +export KUADRANT_DEVELOPER_NS=toystore # Namespace for an example toystore app +export KUADRANT_AWS_ACCESS_KEY_ID=xxxx # AWS Key ID with access to manage the DNS Zone ID below +export KUADRANT_AWS_SECRET_ACCESS_KEY=xxxx # AWS Secret Access Key with access to manage the DNS Zone ID below +export KUADRANT_AWS_DNS_PUBLIC_ZONE_ID=xxxx # AWS Route 53 Zone ID for the Gateway +export KUADRANT_ZONE_ROOT_DOMAIN=example.com # Root domain associated with the Zone ID above +export KUADRANT_CLUSTER_ISSUER_NAME=self-signed # Name for the ClusterIssuer +``` + +### Set up a DNS Provider + +The DNS provider declares credentials to access the zone(s) that Kuadrant can use to set up DNS configuration. Ensure that this credential only has access to the zones you want Kuadrant to manage via `DNSPolicy` + +Create the namespace the Gateway will be deployed in: + +```bash +kubectl create ns ${KUADRANT_GATEWAY_NS} +``` + +Create the secret credentials in the same namespace as the Gateway - these will be used to configure DNS: + +```bash +kubectl -n ${KUADRANT_GATEWAY_NS} create secret generic aws-credentials \ + --type=kuadrant.io/aws \ + --from-literal=AWS_ACCESS_KEY_ID=$KUADRANT_AWS_ACCESS_KEY_ID \ + --from-literal=AWS_SECRET_ACCESS_KEY=$KUADRANT_AWS_SECRET_ACCESS_KEY +``` + +Before adding a TLS issuer, create the secret credentials in the cert-manager namespace: + +```bash +kubectl -n cert-manager create secret generic aws-credentials \ + --type=kuadrant.io/aws \ + --from-literal=AWS_ACCESS_KEY_ID=$KUADRANT_AWS_ACCESS_KEY_ID \ + --from-literal=AWS_SECRET_ACCESS_KEY=$KUADRANT_AWS_SECRET_ACCESS_KEY +``` + +### Deploy the Toystore app + +Create the namespace for the Toystore application: + +```bash + +kubectl create ns ${KUADRANT_DEVELOPER_NS} +``` + +Deploy the Toystore app to the developer namespace: + +```bash +kubectl apply -f https://raw.githubusercontent.com/Kuadrant/Kuadrant-operator/main/examples/toystore/toystore.yaml -n ${KUADRANT_DEVELOPER_NS} +``` + + +### Add a TLS issuer + +To secure communication to the Gateways, define a TLS issuer for TLS certificates. + +!!! note + This example uses Let's Encrypt, but you can use any issuer supported by `cert-manager`. + +```bash +kubectl apply -f - <