docs(installation): knative (#3860)

* added initial knative docu

* added menu bar

* simplified installation

* normalized versions to latest

* update envs

* update envs

* Update zitadel-knative-service.yaml

* Update knative.mdx

* Update knative.mdx

* move knative into correct folder

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Christian Jakob
2022-06-30 13:28:18 +02:00
committed by GitHub
parent 9c0f494bf2
commit 1cc09a85f0
4 changed files with 319 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import MacOS from './macos.mdx'
import Windows from './windows.mdx'
import Compose from './compose.mdx'
import Helm from './helm.mdx'
import Knative from './knative.mdx'
import NextSelfHosted from './nextselfhosted.mdx'
# Run ZITADEL
@@ -27,7 +28,8 @@ By default, it runs a highly available ZITADEL instance along with a secure and
{'label': 'Linux', 'value': 'linux'},
{'label': 'MacOS', 'value': 'macos'},
{'label': 'Docker Compose', 'value': 'compose'},
{'label': 'Kubernetes (Helm)', 'value': 'k8s'}
{'label': 'Kubernetes (Helm)', 'value': 'k8s'},
{'label': 'Knative', 'value': 'knative'}
]}
>
<TabItem value="saas">
@@ -49,4 +51,7 @@ By default, it runs a highly available ZITADEL instance along with a secure and
<Helm/>
<NextSelfHosted/>
</TabItem>
<TabItem value="knative">
<Knative/>
</TabItem>
</Tabs>

View File

@@ -0,0 +1,88 @@
## Disclaimer
This guide is for development / demonstration purpose only and does NOT reflect a production setup.
## New Knative environment
### Download and run Knative quickstart
Follow the Knative quickstart guide to get a local kind/minikube environment with Knative capabilities.
It is basically 4 commands on Mac:
```bash
#install knative
brew install knative/client/kn
#install knative quickstart sandbox
brew install knative-sandbox/kn-plugins/quickstart
#install kind
brew install kind
#install quickstart cluster
kn quickstart kind
```
That will get you a ready to go knative/kubernetes environment.
See Knative documentation here:
https://knative.dev/docs/install/quickstart-install/
## Database
start a single-node cockroachdb as statefulset
```bash
kubectl apply -f https://raw.githubusercontent.com/zitadel/zitadel/v2-alpha/deploy/knative/cockroachdb-statefulset-single-node.yaml
```
## Secret for TLS termination
create a secret with your certificates for TLS termination
```bash
#describe happy path
kubectl apply secret -f certs.yaml
```
## Start ZITADEL with Knative
```bash
# start zitadel
kn service create zitadel \
--image ghcr.io/zitadel/zitadel:v2.0.0-v2-alpha.33-amd64 \
--port 8080 \
--env ZITADEL_DATABASE_HOST=cockroachdb \
--env ZITADEL_EXTERNALSECURE=false \
--env ZITADEL_EXTERNALPORT=80 \
--env ZITADEL_TLS_ENABLED=false \
--env ZITADEL_EXTERNALDOMAIN=zitadel.default.127.0.0.1.sslip.io \
--env ZITADEL_S3DEFAULTINSTANCE_CUSTOMDOMAIN=zitadel.default.127.0.0.1.sslip.io \
--arg "admin" --arg "start-from-init" --arg "--masterkey" --arg "MasterkeyNeedsToHave32Characters" \
--mount /tls.secret=secret:certs/tls.secret \
--mount /tls.key=secret:certs/tls.key
```
or use the knative service yaml
```bash
kubectl apply -f https://raw.githubusercontent.com/zitadel/zitadel/v2-alpha/deploy/knative/zitadel-knative-service.yaml
```
## Get started with ZIDATEL
```bash
#get ZIDATEL URL
kn services list
NAME URL LATEST AGE CONDITIONS READY REASON
zitadel http://zitadel.default.127.0.0.1.sslip.io zitadel-00001 10m 3 OK / 3 True
```
Add the console path to the URL and open in browser
http://zitadel.default.127.0.0.1.sslip.io/ui/console
If you didn't configure something else, this is the default IAM admin users login:
* username: zitadel-admin@zitadel.zitadel.default.127.0.0.1.sslip.io
* password: Password1!