operate k8s-loki
Installation
k8s-loki can be installed as a component via the CES component operator.
To do this, a corresponding custom resource (CR) must be created for the component.
apiVersion: k8s.cloudogu.com/v1
kind: Component
metadata:
name: k8s-loki
labels:
app: ces
spec:
name: k8s-loki
namespace: k8sThe new yaml file can then be created in the Kubernetes cluster:
kubectl apply -f k8s-loki.yaml --namespace ecosystemThe component operator now creates the k8s-loki component in the ecosystem namespace.
Upgrade
To upgrade, the desired version must be specified in the custom resource. To do this, the CR yaml file created is edited and the desired version is entered. Then apply the edited yaml file to the cluster again:
kubectl apply -f k8s-loki.yaml --namespace ecosystemConfiguration
The component can be overwritten via the spec.valuesYamlOverwrite field. The configuration options correspond to those
of
Grafana Loki.
The configuration for the "Grafana Loki" helm chart must be stored in values.yaml under the key loki.
Beispiel:
apiVersion: k8s.cloudogu.com/v1
kind: Component
metadata:
name: k8s-loki
labels:
app: ces
spec:
name: k8s-loki
namespace: k8s
valuesYamlOverwrite: |
loki:
write:
replicas: 3
read:
replicas: 3
backend:
replicas: 3IPv6
In IPv4-only systems it is necessary to disable IPv6. Otherwise, the loki-gateway-pod will not start correctly.
Example:
apiVersion: k8s.cloudogu.com/v1
kind: Component
metadata:
name: k8s-loki
labels:
app: ces
spec:
name: k8s-loki
namespace: k8s
valuesYamlOverwrite: |
loki:
gateway:
nginxConfig:
enableIPv6: falseAdditional configuration
In addition to the standard Loki configuration described above, the k8s-loki component has additional configuration:
| Parameters | Description | Default-Value |
|---|---|---|
| lokiGatewaySecretName | The name of the K8S secret that is generated to provide username and password for the Loki gateway for e.g. k8s-promtail and k8s-ces-control. | k8s-loki-gateway-secret |
Last updated on 10/2/2024