Naiserator is a Kubernetes operator that handles the lifecycle of the CustomResource
called nais.io/Application
.
The main goal of Naiserator is to simplify application deployment by providing a high-level abstraction tailored for the NAIS-platform.
Naiserator supersedes naisd.
When an Application
resource is created in Kubernetes (see
example application),
Naiserator will generate several resources that work together to form a complete deployment:
Deployment
that runs a specified number of application instances,Service
which points to the application endpoint,Ingress
adding TLS termination and virtualhost support,Horizontal pod autoscaler
for automatic application scaling,Service account
for granting correct permissions to managed resources.
These resources will remain in Kubernetes until the Application
resource is deleted.
In order to switch from naisd to Naiserator, you need to complete a few migration tasks. See migration from naisd to naiserator for a detailed explanation of the steps involved.
- Kubernetes v1.11.0 or later
- The Go programming language, version 1.11 or later
- Docker Desktop or other Docker release compatible with Kubernetes
- Kubernetes, either through minikube or a local cluster
You can deploy the most recent release of Naiserator by applying to your cluster:
kubectl apply -f hack/resources/
Go modules
are used for dependency tracking. Make sure you do export GO111MODULE=on
before running any Go commands.
It is no longer needed to have the project checked out in your $GOPATH
.
kubectl apply -f pkg/apis/naiserator/v1alpha1/application.yaml
kubectl apply -f examples/app.yaml
make local
In order to use the Kubernetes Go library, we need to use classes that work together with the interfaces in that library. Those classes are mostly boilerplate code, and to ensure healthy and happy developers, we use code generators for that.
When the CRD changes, or additional Kubernetes resources need to be generated, you have to run code generation:
make codegen-crd
make codegen-updater
git add -A
git commit -a -m "Update boilerplate k8s API code"