2.4 KiB
K8s namespace aka nplus environment
nplus instances are deployed into K8s namespaces. Always. even if you do not specify a namespace, it uses a namespace: default.
In order to use this namespace for nplus instances, you need to deploy some shared nplus components into it, which are used by the instances. This is done by the environment chart:
helm install \
--values demo.yaml \
demo nplus/nplus-environment
After that, the K8s namespace is a valid nplus environment that can house multiple nplus instances.
deploying assets into the environment
Most likely, you will need assets to be used by your instances. Fonts for example: The nscale Rendition Server and die nscale Server Application Layer both require the Microsoft fonts, that are not allowed to be distributed by neither nscale nor nplus. So this example shows how to upload some missing pieces into the environment:
kubectl cp ./apps/app-installer-9.0.1202.jar nplus-toolbox-0:/conf/pool
kubectl cp ./fonts nplus-toolbox-0:/conf/pool
kubectl cp ./copy-snippet.sh nplus-toolbox-0:/conf/pool/scripts
kubectl cp ./test.md nplus-toolbox-0:/conf/pool/snippets
kubectl cp ./snc nplus-toolbox-0:/conf/pool
Alternatively, you can also use a prepper component, that you can activate on the environment chart, to download assets from any web site and deploy them into the environment:
components:
prepper: true
prepper:
download:
- "https://git.nplus.cloud/public/nplus/raw/branch/master/assets/sample.tar.gz"
Please see the prepper README.md for more information.
Operator Web UI
The environment comes with the operator, responsible for managing / controlling the custom resources. It has a Web UI, that can be enabled in the environment chart.
namespace-less manifests
Speaking of namespaces: Sometimes you want to drop the namespace from your manifest. This can be done by
utils:
includeNamespace: false
when you then call
helm template myInstance nplus/nplus-instance > myInstance.yaml
the manifest in myInstance.yaml will not have a namespace set, so you can apply it to multiple namespaces later:
kubectl apply --namespace dev -f myInstance.yaml
kubectl apply --namespace qa -f myInstance.yaml
kubectl apply --namespace prod -f myInstance.yaml
