Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update tutorials docs with cert manager instructions #294

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 39 additions & 3 deletions website/docs/tutorials/envoy-gateway/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ First we need to install Envoy Gateway in the cluster.

```bash
# install envoy gateway
helm install envoy-gateway -n envoy-gateway-system --create-namespace --wait --version v1.2.2 oci://docker.io/envoyproxy/gateway-helm
helm install envoy-gateway \
--namespace envoy-gateway-system --create-namespace \
--wait \
--version v1.2.2 oci://docker.io/envoyproxy/gateway-helm
```

### Deploy a sample application
Expand All @@ -42,7 +45,9 @@ Httpbin is a well-known application that can be used to test HTTP requests and h
kubectl create ns demo

# deploy the httpbin application
kubectl apply -n demo -f https://raw.githubusercontent.com/istio/istio/master/samples/httpbin/httpbin.yaml
kubectl apply \
-n demo \
-f https://raw.githubusercontent.com/istio/istio/master/samples/httpbin/httpbin.yaml
```

### Create a GatewayClass and a Gateway
Expand Down Expand Up @@ -119,13 +124,44 @@ spec:
EOF
```

### Deploy cert-manager

The Kyverno Authz Server comes with a validation webhook and needs a certificate to let the api server call into it.

Let's deploy `cert-manager` to manage the certificate we need.

```bash
# install cert-manager
helm install cert-manager \
--namespace cert-manager --create-namespace \
--wait \
--repo https://charts.jetstack.io cert-manager \
--set crds.enabled=true

# create a self-signed cluster issuer
kubectl apply -f - <<EOF
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: selfsigned-issuer
spec:
selfSigned: {}
EOF
```

### Deploy the Kyverno Authz Server

Now deploy the Kyverno Authz Server.

```bash
# deploy the kyverno authz server
helm install kyverno-authz-server --namespace kyverno --create-namespace --wait --repo https://kyverno.github.io/kyverno-envoy-plugin kyverno-authz-server
helm install kyverno-authz-server \
--namespace kyverno --create-namespace \
--wait \
--repo https://kyverno.github.io/kyverno-envoy-plugin kyverno-authz-server \
--set certificates.certManager.issuerRef.group=cert-manager.io \
--set certificates.certManager.issuerRef.kind=ClusterIssuer \
--set certificates.certManager.issuerRef.name=selfsigned-issuer
```

## Create a Kyverno AuthorizationPolicy
Expand Down
39 changes: 36 additions & 3 deletions website/docs/tutorials/istio/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,34 @@ Notice that in the configuration, we define an `extensionProviders` section that
[...]
```

### Deploy cert-manager

The Kyverno Authz Server comes with a validation webhook and needs a certificate to let the api server call into it.

Let's deploy `cert-manager` to manage the certificate we need.

```bash
# install cert-manager
helm install cert-manager \
--namespace cert-manager --create-namespace \
--wait \
--repo https://charts.jetstack.io cert-manager \
--set crds.enabled=true

# create a self-signed cluster issuer
kubectl apply -f - <<EOF
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: selfsigned-issuer
spec:
selfSigned: {}
EOF
```

### Deploy the Kyverno Authz Server

The first step is to deploy the Kyverno Authz Server.
Now we can deploy the Kyverno Authz Server.

```bash
# create the kyverno namespace
Expand All @@ -68,7 +93,13 @@ kubectl create ns kyverno
kubectl label namespace kyverno istio-injection=enabled

# deploy the kyverno authz server
helm install kyverno-authz-server --namespace kyverno --wait --repo https://kyverno.github.io/kyverno-envoy-plugin kyverno-authz-server
helm install kyverno-authz-server \
--namespace kyverno \
--wait \
--repo https://kyverno.github.io/kyverno-envoy-plugin kyverno-authz-server \
--set certificates.certManager.issuerRef.group=cert-manager.io \
--set certificates.certManager.issuerRef.kind=ClusterIssuer \
--set certificates.certManager.issuerRef.name=selfsigned-issuer
```

### Deploy a sample application
Expand All @@ -83,7 +114,9 @@ kubectl create ns demo
kubectl label namespace demo istio-injection=enabled

# deploy the httpbin application
kubectl apply -f https://raw.githubusercontent.com/istio/istio/master/samples/httpbin/httpbin.yaml -n demo
kubectl apply \
-n demo \
-f https://raw.githubusercontent.com/istio/istio/master/samples/httpbin/httpbin.yaml
```

### Deploy an Istio AuthorizationPolicy
Expand Down
Loading