Skip to content

Commit

Permalink
docs: update quick start docs with cert manager instructions (#295)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Jan 6, 2025
1 parent 0f48276 commit edf21e4
Showing 1 changed file with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions website/docs/quick-start/authz-server.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,9 +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 @@ -85,8 +114,9 @@ kubectl create ns demo
kubectl label namespace demo istio-injection=enabled

# 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
```

### Deploy an Istio AuthorizationPolicy
Expand Down

0 comments on commit edf21e4

Please sign in to comment.