• DMCA
  • Terms and Conditions
  • Privacy Policy
  • Contact Us
  • Whitelist
Monday, May 23, 2022
Survival Society
  • Home
  • Naval Survival
  • Land Survival
  • Survival Strategy
  • Defense
No Result
View All Result
  • Home
  • Naval Survival
  • Land Survival
  • Survival Strategy
  • Defense
No Result
View All Result
Survival Society
No Result
View All Result

How to use the Humio Operator to run Humio on Kubernetes

wbstadm by wbstadm
October 28, 2021
in Uncategorized
0
How to use the Humio Operator to run Humio on Kubernetes

This blog was originally published Nov. 12, 2020 on humio.com. Humio is a CrowdStrike Company.

Running distributed stateful systems on Kubernetes can be a challenge — but it doesn’t have to be. The Humio Operator facilitates the configuration and deployment, and eases the management of your Humio clusters running on Kubernetes. In our previous blog post, we introduced the Humio Operator. In this second of a two-part series, we walk you through how to use the Humio Operator to run Humio on Kubernetes.

To run Humio on Kubernetes, you need Apache ZooKeeper and Apache Kafka. For full end-to-end instructions on preparing and installing Humio on Kubernetes, see the Operator Quick Start Guide. For simplicity’s sake, we will create a Humio Cluster using Persistent Volumes, we assume we have Zookeeper and Kafka, and we will use ‘port-forward’ to connect to our cluster.

Install CRDs

Before the Humio Operator can be installed, we must create our Custom Resource Definitions. The CRDs define the resources that the Humio Operator will manage, which include HumioClusters, HumioExternalClusters, HumioIngestTokens, HumioParsers, and HumioRepositories.

Find the version of the Humio Operator that we want to install, and create the CRDs:

export HUMIO_OPERATOR_VERSION=0.1.1
kubectl apply -f https://raw.githubusercontent.com/humio/humio-operator/humio-operator-${HUMIO_OPERATOR_VERSION}/config/crd/bases/core.humio.com_humioclusters.yaml
kubectl apply -f https://raw.githubusercontent.com/humio/humio-operator/humio-operator-${HUMIO_OPERATOR_VERSION}/config/crd/bases/core.humio.com_humioexternalclusters.yaml
kubectl apply -f https://raw.githubusercontent.com/humio/humio-operator/humio-operator-${HUMIO_OPERATOR_VERSION}/config/crd/bases/core.humio.com_humioingesttokens.yaml
kubectl apply -f https://raw.githubusercontent.com/humio/humio-operator/humio-operator-${HUMIO_OPERATOR_VERSION}/config/crd/bases/core.humio.com_humioparsers.yaml
kubectl apply -f https://raw.githubusercontent.com/humio/humio-operator/humio-operator-${HUMIO_OPERATOR_VERSION}/config/crd/bases/core.humio.com_humiorepositories.yaml

Install the Humio Operator

The Humio Operator can be installed with Helm.

First add the helm repo:

helm repo add humio-operator https://humio.github.io/humio-operator

And install:

helm install humio-operator humio-operator/humio-operator --version="${HUMIO_OPERATOR_VERSION}"

A full list of Helm values can be found in the installation documentation.

Create a Humio Cluster

A HumioCluster resource can now be created. The HumioCluster will start up our Humio pods. We need to point this cluster to our existing ZooKeeper and Kafka clusters.

cat <apiVersion: core.humio.com/v1alpha1
kind: HumioCluster
metadata:
name: example-humiocluster
spec:
autoRebalancePartitions: true
tls:
enabled: false
dataVolumePersistentVolumeClaimSpecTemplate:
storageClassName: standard
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 10Gi
environmentVariables:
- name: "SINGLE_USER_PASSWORD"
value: "develop3r"
- name: "HUMIO_JVM_ARGS"
value: "-Xss2m -Xms256m -Xmx1536m -server -XX:+UseParallelOldGC -XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -Dzookeeper.client.secure=false"
- name: "ZOOKEEPER_URL"
value: ""
- name: "KAFKA_SERVERS"
value: ""
EOF
humiocluster.core.humio.com/example-humiocluster created

Once the HumioCluster is created, it will go into the state of Bootstrapping until all Humio pods are up:

kubectl get humiocluster
NAME                   STATE           NODES   VERSION
example-humiocluster   Bootstrapping

Once all Humio nodes are up, the Operator will have access to the Humio cluster and update the status of the HumioCluster custom resource including node count and version. At this point it will automatically balance our digest and storage partitions and be ready to create other Humio resources.

kubectl get humiocluster
NAME                   STATE     NODES   VERSION
example-humiocluster   Running   3       1.16.0--build-293562267--sha-39bbd8579eba9d6527e8b1579cdb9504a426a411

We can access the Humio UI by using kubectl port-forward. For production installations, we would rely on Ingress.

kubectl port-forward svc/example-humiocluster 8080
Forwarding from 127.0.0.1:8080 -> 8080
Forwarding from [::1]:8080 -> 8080
Handling connection for 8080
Handling connection for 8080

Now go to http://localhost:8080 and login using the username “developer” and password “develop3r”, which we set during the cluster creation. When we go to the Cluster Administration under the settings button in the top right corner, we see the list of our pods and that the digest and storage partitions have been balanced:

Create a Repository, Parser, and Ingest Token

Now that we have a running cluster, we can create some other resources that are managed by the Operator. Let’s start with a Repository.

cat <

Now create a Parser and assign it to the Repository that we just created:

cat <[^]]+)]/
        | /^(?<@timestamp>.*)[warn].*/
        | parseTimestamp(format="yyyy/MM/dd' 'HH:mm:ss", [email protected]);
      parseJson();
      * | kvParse()
    }
EOF
humioparser.core.humio.com/fluentbit-parser created

Finally, before we send logs to the cluster, we need to create an Ingest Token and assign it to the Repository and Parser.

cat <

Since we set “tokenSecretName” in the Ingest Token spec, the token content is stored as a secret in Kubernetes. We can then fetch the token:

export INGEST_TOKEN=$(kubectl get secret fluentbit-ingest-token -o template --template '{{.data.token}}' | base64 -D)

We can go to the Humio UI and verify that the Repository is configured with our Ingest Token and Parser:

Ingest Logs

Logs can now be sent to the cluster using the ingest token extracted from the previous step. To gather logs from the cluster, we install Fluent Bit using the Humio Helm Chart:

First, add the Helm repo:

helm repo add humio https://humio.github.io/humio-helm-charts
helm repo update

Create a Fluent Bit values file, which points to our cluster:

cat >> humio-agent.yaml<

Now install it:

helm install humio humio/humio-helm-charts --set humio-fluentbit.token=$INGEST_TOKEN -f humio-agent.yaml

Once it’s installed, we can go back to the Humio UI and confirm that our Operator logs, along with logs from other containers running in the Kubernetes cluster, are being consumed by Humio:

We aren’t able to go over every capability of the Humio Operator in this blog as there is just too much to cover, but we hope you found this blog post a useful introduction to help you get started running Humio on your Kubernetes environment. More information is available in our Humio Operator installation documentation in addition to documentation that covers how to migrate an existing Humio deployment that utilized our previous Helm based deployment.

We also encourage you learn more by watching our on-demand webinar on Running Humio on Kubernetes with the Humio Operator. You’ll learn best practices for leveraging the Humio Operator to maintain Humio resources, tips for making the best use of your cloud environment’s storage options, and more.

Additional resources

Source
How to use the Humio Operator to run Humio on Kubernetes is written by Humio Staff for www.crowdstrike.com

Previous Post

Navy’s Unmanned Ships Sail With US Ally In The Middle East – Breaking Defense Breaking Defense

Next Post

With Connecticut Stuck In Guam, Spotlight Is Back On Navy’s Shipyard Plans – Breaking Defense Breaking Defense

Next Post
With Connecticut Stuck In Guam, Spotlight Is Back On Navy’s Shipyard Plans – Breaking Defense Breaking Defense

With Connecticut Stuck In Guam, Spotlight Is Back On Navy's Shipyard Plans - Breaking Defense Breaking Defense

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe to our Newsletter

Categories

  • Defense
  • Land Survival
  • Naval Survival
  • Survival Strategy
  • Trending
  • Comments
  • Latest
Army modernization programs need to put ‘points on the board’: Acquisition chief – Breaking Defense Breaking Defense

Army modernization programs need to put ‘points on the board’: Acquisition chief – Breaking Defense Breaking Defense

February 17, 2022
Lockheed Martin walks away from $4.4B Aerojet Rocketdyne acquisition – Breaking Defense Breaking Defense

Lockheed Martin walks away from $4.4B Aerojet Rocketdyne acquisition – Breaking Defense Breaking Defense

February 14, 2022
Starting Seeds, The Easy And Smart Way Off The Grid News

Starting Seeds, The Easy And Smart Way Off The Grid News

March 11, 2022
China’s Third Aircraft Carrier Takes Shape: CSIS – Breaking Defense Breaking Defense

China’s Third Aircraft Carrier Takes Shape: CSIS – Breaking Defense Breaking Defense

June 16, 2021
After DoD’s $1.5B move, Army and Marines rush to buy new Javelins, Stingers

After DoD’s $1.5B move, Army and Marines rush to buy new Javelins, Stingers

0
Workplace Hate Crimes | Carol Cambridge

Workplace Hate Crimes | Carol Cambridge

0
Situational Awareness | Carol Cambridge

Situational Awareness | Carol Cambridge

0
Survival Mindset vs. Victim Mentality

Survival Mindset vs. Victim Mentality

0
After DoD’s $1.5B move, Army and Marines rush to buy new Javelins, Stingers

After DoD’s $1.5B move, Army and Marines rush to buy new Javelins, Stingers

May 6, 2022
A Littoral Combat Ship deploys to 6th Fleet for the first time

A Littoral Combat Ship deploys to 6th Fleet for the first time

May 6, 2022
For first time, France talks openly about sending weapons to Ukraine

For first time, France talks openly about sending weapons to Ukraine

May 5, 2022
Marines’ new aviation plan in the works: General – Breaking Defense Breaking Defense

New Marine Corps aviation plan makes ‘digital interoperability’ a top priority

May 3, 2022

Archives

  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • August 2019
  • July 2019
  • May 2018
  • April 2018
  • DMCA
  • Terms and Conditions
  • Privacy Policy
  • Contact Us
  • Whitelist

© 2021 All Rights Reserved survivalsociety.com

No Result
View All Result
  • Home
  • Naval Survival
  • Land Survival
  • Survival Strategy
  • Defense

© 2021 All Rights Reserved survivalsociety.com