Hi, I am using Amazon EKS with S3 to deploy Loki. This is my config.
cat environments/loki/main.jsonnet
local gateway = import ‘loki/gateway.libsonnet’;
local loki = import ‘loki/loki.libsonnet’;
local promtail = import ‘promtail/promtail.libsonnet’;
loki + promtail + gateway {
_config+:: {
namespace: ‘loki’,
htpasswd_contents: ‘loki:abc/efg’,
using_boltdb_shipper: true,
boltdb_shipper_shared_store: 's3',
stateful_ingesters: true,
ingester_pvc_class: 'gp2',
stateful_queriers: true,
querier_pvc_class: 'gp2',
compactor_pvc_class: 'gp2',
// S3 variables remove if not using aws
storage_backend: 's3',
s3_access_key: 'abc',
s3_secret_access_key: 'def',
s3_address: 'us-west-2',
s3_bucket_name: 'dev-xx-loki',
s3_path_style: true,
loki: {
schema_config: {
configs: [{
from: '2020-10-24',
store: 'boltdb-shipper',
object_store: 's3',
schema: 'v11',
index: {
prefix: 'loki_index_',
period: '24h',
},
}],
},
},
promtail_config+: {
clients: [{
scheme:: 'http',
hostname:: 'gateway.%(namespace)s.svc' % $._config,
username:: 'loki',
password:: 'password',
container_root_path:: '/var/lib/docker',
}],
},
replication_factor: 3,
consul_replicas: 1,
},
}
Blockquote
However, I find compactor, queries are not active. Logs are
level=info ts=2020-11-19T06:28:09.692092288Z caller=main.go:128 msg=“Starting Loki” version=“(version=2.0.0, branch=HEAD, revision=6978ee5d7)”
11/18/2020 10:28:09 PM level=error ts=2020-11-19T06:28:09.692272085Z caller=log.go:149 msg=“error running loki” err=“listen tcp :80: bind: permission denied\nerror initialising module: server\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).initModule\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/util/modules/modules.go:105\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).InitModuleServices\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/util/modules/modules.go:75\ngithub.com/grafana/loki/pkg/loki.(*Loki).Run\n\t/src/loki/pkg/loki/loki.go:204\nmain.main\n\t/src/loki/cmd/loki/main.go:130\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1373”
I am not sure why it is trying to bind 80 cause the YAML config is
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
name: distributor
topologyKey: kubernetes.io/hostname
containers:
- args:
- -config.file=/etc/loki/config/config.yaml
- -limits.per-user-override-config=/etc/loki/overrides/overrides.yaml
- -target=distributor
image: grafana/loki:2.0.0
imagePullPolicy: IfNotPresent
name: distributor
ports: - containerPort: 3100
name: http-metrics
protocol: TCP - containerPort: 9095
name: grpc
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /ready
port: 3100
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 10
Thanks for the help