Install with Operator
This method requires access to create cluster level resources such as ClusterRole, ClusterRoleBinding, CustomResourceDefinition and so on.
Use the Namespace-scoped Installation if you do not want to assign the cluster level permissions.
Controller Custom Resource Definition
The Aperture Controller is a Kubernetes-based application and is installed using the Kubernetes Custom Resource, which is managed by the Aperture Operator.
The configuration for the Aperture Controller process is provided to the
Controller CRD under the controller.config
section. All the configuration
parameters for the Aperture Controller are listed
here.
Installation
By following these instructions, you will have deployed the Aperture Controller into your cluster.
Kubernetes Objects which will be created by the following steps are listed here.
Run the following
install
command:- Helm
- aperturectl
helm install controller aperture/aperture-controller
aperturectl install controller --version main
By default, Prometheus and etcd instances are installed. If you do not want to install and use your existing instances of Prometheus or etcd, configure the following values in the
values.yaml
file and pass it with theinstall
command:controller:
config:
etcd:
endpoints: ["ETCD_ENDPOINT_HERE"]
prometheus:
address: "PROMETHEUS_ADDRESS_HERE"
etcd:
enabled: false
prometheus:
enabled: falseReplace the values of
ETCD_ENDPOINT_HERE
andPROMETHEUS_ADDRESS_HERE
with the actual values of etcd and Prometheus, which will be used by the Aperture Controller.- Helm
- aperturectl
helm install controller aperture/aperture-controller -f values.yaml
aperturectl install controller --version main --values-file values.yaml
A list of all the configurable parameters for etcd are available here, and Prometheus are available here.
Note: Ensure that the flag
web.enable-remote-write-receiver
is enabled on your existing Prometheus instance, as it is required by the Aperture Controller.If you want to modify the default parameters or the Aperture Controller configuration, for example
log
, you can create or update thevalues.yaml
file and pass it withinstall
command:controller:
config:
log:
level: debug
pretty_console: true
non_blocking: false- Helm
- aperturectl
helm install controller aperture/aperture-controller -f values.yaml
aperturectl install controller --version main --values-file values.yaml
All the configuration parameters for the Aperture Controller are available here.
A list of configurable parameters for the installation can be found in the README.
If you want to deploy the Aperture Controller into a namespace other than
default
, use the--namespace
flag:- Helm
- aperturectl
helm install controller aperture/aperture-controller -f values.yaml --namespace aperture-controller --create-namespace
aperturectl install controller --version main --values-file values.yaml --namespace aperture-controller
Alternatively, you can create the Controller Custom Resource directly on the Kubernetes cluster using the below steps:
Create a
values.yaml
for starting the operator and disabling the creation of Controller Custom Resource and pass it withinstall
command:controller:
create: false- Helm
- aperturectl
helm install controller aperture/aperture-controller -f values.yaml
aperturectl install controller --version main --values-file values.yaml
Create a YAML file with the below specifications:
apiVersion: fluxninja.com/v1alpha1
kind: Controller
metadata:
name: controller
spec:
image:
registry: docker.io/fluxninja
repository: aperture-controller
tag: latest
config:
etcd:
endpoints: ["http://controller-etcd.default.svc.cluster.local:2379"]
prometheus:
address: "http://controller-prometheus-server.default.svc.cluster.local:80"All the configuration parameters for the Controller Custom Resource are listed on the README file of the Helm chart.
Apply the YAML file to the Kubernetes cluster using
kubectl
kubectl apply -f controller.yaml
Upgrade Procedure
By following these instructions, you will have deployed the upgraded version of Aperture Controller into your cluster.
Use the same
values.yaml
file created as part of Installation Steps and pass it with below command:- Helm
- aperturectl
helm template --include-crds --no-hooks controller aperture/aperture-controller -f values.yaml | kubectl apply -f -
Once all the pods are in a running state after upgrade, run the below command to keep the Helm release updated:
helm upgrade controller aperture/aperture-controller -f values.yaml
aperturectl install controller --version main --values-file values.yaml
If you have deployed the Aperture Controller into a namespace other than
default
, use the--namespace
flag:- Helm
- aperturectl
helm template --include-crds --no-hooks controller aperture/aperture-controller -f values.yaml --namespace aperture-controller | kubectl apply -f -
Once all the pods are in a running state after upgrade, run the below command to keep the Helm release updated:
helm upgrade controller aperture/aperture-controller -f values.yaml --namespace aperture-controller
aperturectl install controller --version main --values-file values.yaml --namespace aperture-controller
Verifying the Installation
Once you have successfully deployed the resources, confirm that the Aperture Controller is up and running:
kubectl get pod -A
kubectl get controller -A
You should see pods for Aperture Controller and Controller Manager in RUNNING
state and Controller
Custom Resource in created
state.
Uninstall
You can uninstall the Aperture Controller and its components installed above by following the below steps:
Uninstall the Aperture Controller:
- Helm
- aperturectl
helm uninstall controller
aperturectl uninstall controller --version main
Alternatively, if you have installed the Aperture Controller Custom Resource separately, follow the below steps:
Delete the Aperture Controller Custom Resource:
kubectl delete -f controller.yaml
Delete the Aperture Controller to uninstall the Aperture Operator:
- Helm
- aperturectl
helm uninstall controller
aperturectl uninstall controller
If you have installed the chart in some other namespace than
default
, run the below commands:- Helm
- aperturectl
helm uninstall controller --namespace aperture-controller
kubectl delete namespace aperture-controlleraperturectl uninstall controller --namespace aperture-controller
If you have installed the Contour chart for exposing the etcd and Prometheus service, run the below command:
helm uninstall aperture -n projectcontour
kubectl delete namespace projectcontourBy default, the Secret and ConfigMap having SSL/TLS certificates generated by the Kubernetes Operator for itself and Aperture Controller are not deleted with above steps. If you want to delete them, run the below commands:
kubectl delete secret -l app.kubernetes.io/instance=controller-aperture-controller-manager
kubectl delete secret -l app.kubernetes.io/instance=controller
kubectl delete configmap -l app.kubernetes.io/instance=controllerOptional: Delete the CRD installed by the Helm chart:
Note: Intentionally, deleting a chart by using Helm does not delete the Custom Resource Definitions installed by using the Helm chart.
kubectl delete crd controllers.fluxninja.com
kubectl delete crd policies.fluxninja.com