Install Wiki.js on Kubernetes

Install Wiki.js on Kubernetes specifically GKE with Istio for routing.
Wiki.js is the most powerful and extensible open source Wiki software. We are going to use Helm to Wiki.js. First create a new namespace wiki to hold the Wiki.js resources.
kubectl create namespace wiki helm repo add requarks https://charts.js.wiki helm repo update
Install
Prepare
Prepare a helm configuration values.yaml file. It may be prudent to set up a persistent volumes and secrets before hand then configuring these as well, however for the sake of simplicity we will let Helm do this for us. Take note of the following
- Update ingress.enabled to false as we will use the existing Istio ingress to route to wikijs
- Update postgresql.enabled to false to not install PostgreSQL. Update the other PostgreSQL variables to point to an external database
ingress: enabled: false postgresql: enabled: false postgresqlDatabase: wikijs postgresqlUser: wikijs postgresqlHost: "database.domain.com" postgresqlPassword: "domain" postgresqlPort: 5432
Apply
helm install wikijs -f values.yaml requarks/wiki -n wik
with the output
NAME: wikijs
LAST DEPLOYED: Sun Dec 26 12:53:56 2021
NAMESPACE: wiki
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
export POD_NAME=$(kubectl get pods --namespace wiki -l "app.kubernetes.io/name=wiki,app.kubernetes.io/instance=wikijs" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace wiki port-forward $POD_NAME 8080:80
Route
We now need to add a routing to wiki.js in Istio
Prepare
Create an wikijs-virtual-service.yaml file. Ensure the relevant gateway already exists and caters for routing of messaging.domain.com. Ensure that you have also created a dns entry pointing sonarqube.domain.com to the cluster external static IP.
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: wikijs-virtual-service
spec:
hosts:
- wiki.domain.com
gateways:
- istio-ingress/application-gateway
http:
- route:
- destination:
host: wikijs.wiki.svc.cluster.local
port:
number: 80Apply
kubectl apply -f wikijs-virtual-service.yaml -n wiki
Try it out
Browse to http://wiki.domain.com and log in to SonarQube. You can login as user admin with password admin. Once logged in change you will be prompted to change the password immediately.