
HumioCluster Networking and Ingress
The Humio Operator can configure ingress, DNS, and hostname sources for a LogScale cluster.
Nginx ingress with Cert Manager
Configuring Ingress with Cert Manager creates an Ingress resource for cluster access and a valid certificate from Cert Manager.
Note
Ingress is currently not supported for Node Pools. This is an error, not
just an ignored setting. With
nodePools set and ingress enabled,
the operator returns "ingress only supported if pods belong to
HumioCluster.Spec.NodeCount", and the reconcile stops before pod
creation.
apiVersion: core.humio.com/v1alpha1
kind: HumioCluster
metadata:
name: example-humiocluster
spec:
nodeCount: 3
license:
secretKeyRef:
name: example-humiocluster-license
key: data
#image: "humio/humio-core:1.171.1"
environmentVariables:
- name: "ZOOKEEPER_URL"
value: "humio-cp-zookeeper-0.humio-cp-zookeeper-headless:2181"
- name: "KAFKA_SERVERS"
value: "humio-cp-kafka-0.humio-cp-kafka-headless:9092"
hostname: "humio.example.com"
esHostname: "humio-es.example.com"
ingress:
enabled: true
controller: nginx
annotations:
use-http01-solver: "true"
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/ingress.class: nginx
dataVolumePersistentVolumeClaimSpecTemplate:
storageClassName: standard
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 10GiNginx ingress with custom path
To run LogScale under a custom path, use the following configuration.
Note
Ingress is currently not supported for Node Pools. This is an error, not
just an ignored setting. With
nodePools set and ingress enabled,
the operator returns "ingress only supported if pods belong to
HumioCluster.Spec.NodeCount", and the reconcile stops before pod
creation.
apiVersion: core.humio.com/v1alpha1
kind: HumioCluster
metadata:
name: example-humiocluster
spec:
nodeCount: 3
license:
secretKeyRef:
name: example-humiocluster-license
key: data
#image: "humio/humio-core:1.171.1"
environmentVariables:
- name: "ZOOKEEPER_URL"
value: "humio-cp-zookeeper-0.humio-cp-zookeeper-headless:2181"
- name: "KAFKA_SERVERS"
value: "humio-cp-kafka-0.humio-cp-kafka-headless:9092"
hostname: "humio.example.com"
esHostname: "humio-es.example.com"
ingress:
enabled: true
controller: nginx
annotations:
use-http01-solver: "true"
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/ingress.class: nginx
dataVolumePersistentVolumeClaimSpecTemplate:
storageClassName: standard
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 10GiHumioCluster with hostname references
When spec.hostname or
spec.esHostname cannot be managed in
the HumioCluster resource, it's possible to use a reference to an external
source for either. Currently
secretKeyRef is supported.
Note
Setting both hostname and
hostnameSource (or both
esHostname and
esHostnameSource) is an error
("conflicting fields"). The secret must be in the
HumioCluster's namespace and contain the referenced key.
To use secretKeyRef containing the
hostname, create the secret as shown
below, where <hostname> is the
hostname for the HumioCluster:
$ kubectl create secret generic <cluster-name>-hostname --from-literal=data=<hostname> -n <namespace>Then update the HumioCluster resource to use the hostname reference:
spec:
hostnameSource:
secretKeyRef:
name: <cluster-name>-hostname
key: data
To use secretKeyRef containing the
esHostname, create the secret as
shown below, where
<es-hostname> is the
es-hostname for the HumioCluster:
$ kubectl create secret generic <cluster-name>-es-hostname --from-literal=data=<es-hostname> -n <namespace>Then update the HumioCluster resource to use the esHostname reference:
spec:
esHostnameSource:
secretKeyRef:
name: <cluster-name>-es-hostname
key: dataDNS configuration
The dnsPolicy and
dnsConfig fields control DNS
resolution for LogScale pods. These fields map directly to the
Kubernetes PodSpec DNS settings and can be set at the top-level spec or
per node pool. Node pools do not inherit these settings from the top-level
spec. Set them on each node pool that needs them. For example:
spec:
dnsPolicy: "ClusterFirst"
nodePools:
- name: ingest-only
spec:
dnsPolicy: "None"
dnsConfig:
nameservers:
- "10.0.0.10"
The available values for dnsPolicy
are:
ClusterFirst(default): Queries go to the cluster DNS service. Unresolved queries are forwarded upstream.ClusterFirstWithHostNet: Same as ClusterFirst, but for pods that run with host networking.Default: Inherits DNS configuration from the node where the pod runs.None: Ignores all Kubernetes DNS settings. You must provide DNS configuration through thednsConfigfield.
The following example sets dnsPolicy
to None and provides custom
nameservers and search domains through
dnsConfig:
spec:
dnsPolicy: "None"
dnsConfig:
nameservers:
- "10.0.0.10"
- "10.0.0.11"
searches:
- "logscale.svc.cluster.local"
- "svc.cluster.local"
- "cluster.local"
options:
- name: ndots
value: "5"Important
When dnsPolicy is
None,
dnsConfig is required. The
Kubernetes API server rejects a
HumioCluster or
HumioNodePool that sets
dnsPolicy: None without
dnsConfig.
dnsConfig must also contain at
least one nameserver, otherwise Kubernetes rejects the pods.
To add custom DNS options while preserving cluster DNS, set
dnsPolicy to
ClusterFirst and supply additional
entries through dnsConfig.
Kubernetes merges the custom configuration with the cluster DNS settings:
spec:
dnsPolicy: "ClusterFirst"
dnsConfig:
options:
- name: ndots
value: "3"