[{"Value":"","Discard":false,"Expires":9999999999}]
La entrada OpenSearch for SREs: The Open-Source Observability Powerhouse on Kubernetes se publicó primero en CloudArch.
]]>In the dynamic world of cloud-native infrastructure, robust observability is not just a nice-to-have; it’s a foundational requirement for any Site Reliability Engineer (SRE). For years, Elasticsearch dominated the landscape for log aggregation and search. However, a significant licensing change by Elastic in early 2021 created a void, prompting AWS to fork the last Apache 2.0 licensed version and launch OpenSearch.
What is OpenSearch? At its core, OpenSearch is a distributed, RESTful search and analytics engine built on Apache Lucene. It’s designed for high-volume data ingestion and rapid querying across massive datasets. Think of it as a specialized database for semi-structured data like logs, metrics, and traces.
Why is its open-source nature important for SREs? The “open” in OpenSearch isn’t just a marketing buzzword; it’s critical for SREs:
For an SRE, OpenSearch provides the backbone for what’s often called the “OSD Stack” (OpenSearch, OpenSearch Dashboards, and Data Prepper/Fluent Bit), empowering proactive monitoring, rapid incident response, and deep operational insights.
To wield OpenSearch effectively, you need to understand its fundamental building blocks:
cluster_manager (formerly “master”) nodes (brains for cluster state), others are data nodes (muscles for storing and searching data), and some can be ingest nodes (for pre-processing data). SREs design clusters with dedicated nodes for stability and scale.application-logs-2026.02.08).The best way to understand OpenSearch is to run it. We’ll set up a mini-stack on Minikube (or any Kubernetes cluster) that mirrors a production setup for logs:
All configurations will be declarative, using Helm charts and Kubernetes Jobs, making it fully automated and version-controllable—true SRE style.
kubectl installed and configuredhelm installedEnsure your Minikube has enough resources for OpenSearch:
minikube start --cpus 4 --memory 8192 --driver dockerhelm repo add opensearch https://opensearch-project.github.io/helm-charts/
helm repo add fluent https://fluent.github.io/helm-charts
helm repo updateWe’ll use a values.yaml file to set up a single-node OpenSearch cluster with a secure admin password and OpenSearch Dashboards.
Save the following as opensearch-values.yaml:
# opensearch-values.yaml
singleNode: true
persistence:
enabled: false # For a lab, we'll keep it stateless. Set to true for production with PVs.
extraEnvs:
- name: OPENSEARCH_INITIAL_ADMIN_PASSWORD
value: YourStrongPassword123! # <<< CHANGE THIS TO A STRONG PASSWORDNow deploy:
helm install my-os opensearch/opensearch -f opensearch-values.yaml
helm install my-dashboards opensearch/opensearch-dashboardsNote: OpenSearch will take a few minutes to start as it initializes its JVM and security plugin. Keep an eye on kubectl get pods -w.
This is our log source:
kubectl create deployment nginx-server --image=nginx
kubectl expose deployment nginx-server --port=80Fluent Bit will scrape Nginx logs and send them to OpenSearch. We’ll use a fluent-bit-values.yaml to handle the configuration declaratively and resolve common SRE headaches (DNS, auth, mapping issues).
Save the following as fluent-bit-values.yaml:
# fluent-bit-values.yaml
config:
service: |
[SERVICE]
Daemon Off
Flush 1
Log_Level info
Parsers_File parsers.conf
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port 2020
Health_Check On
inputs: |
[INPUT]
Name tail
Path /var/log/containers/*.log
multiline.parser docker, cri
Tag kube.*
Mem_Buf_Limit 5MB
Skip_Long_Lines On
filters: |
[FILTER]
Name kubernetes
Match kube.*
Kube_URL https://kubernetes.default.svc:443
Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token
Kube_Tag_Prefix kube.var.log.containers.
Merge_Log On
Merge_Log_Key log_processed
Keep_Log Off
# These help prevent mapping conflicts from inconsistent pod labels
Labels Off
Annotations Off
outputs: |
[OUTPUT]
Name es
Match *
Host my-os-opensearch # This is the Kubernetes Service name for OpenSearch
Port 9200
HTTP_User admin
HTTP_Passwd YourStrongPassword123! # <<< USE THE SAME PASSWORD AS ABOVE
Logstash_Format On
Logstash_Prefix nginx-logs
tls On
tls.verify Off
Suppress_Type_Name On # Crucial for OpenSearch 2.x
Trace_Error On # For better debugging in Fluent Bit logsDeploy Fluent Bit:
helm install fluent-bit fluent/fluent-bit -f fluent-bit-values.yamlIn a Kubernetes ecosystem, logs are ephemeral—when a pod dies, its logs go with it. To prevent this, we need a DaemonSet that acts as a “log vacuum.” We chose Fluent Bit because it’s the lightweight, high-performance cousin of Fluentd. It has a tiny memory footprint (crucial when you’re running it on every node in a cluster) and handles the “Log Pipeline” in three distinct stages:
.log files created by the Kubernetes container engine on the node’s disk.When you look at a Fluent Bit configuration, it’s organized into distinct sections. Each one has a specific job in the “Ingestion Lifecycle.” Understanding these is the key to onboarding any new service into OpenSearch.
[SERVICE] (The Global Brain): This section defines the engine’s behavior. It controls how often data is “flushed” (sent) to the destination, where the internal logs go, and whether to enable a health-check server. For SREs, this is where we tune performance and monitoring for the log shipper itself.[INPUT] (The Collector): This is the “vacuum cleaner.” It tells Fluent Bit where to get data. In Kubernetes, we usually use the tail input to follow the log files generated by the container runtime (CRI/Docker). You can have multiple inputs—one for system logs, one for app logs, and even one for metrics.[FILTER] (The Processor): This is where the magic happens. Filters allow you to modify data in flight.[OUTPUT] (The Destination): This defines the “Exit” for your data. In our case, it’s the es (Elasticsearch/OpenSearch) plugin. This section handles the connection details, authentication, and index naming conventions.This is where the SRE magic happens. We’ll use a Job to apply our ISM policy (7-day retention) and create the nginx-logs-* index pattern in Dashboards, all via API calls.
Save the following as observability-setup-job.yaml:
# observability-setup-job.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: opensearch-sre-setup-script
data:
setup.sh: |
#!/bin/bash
set -euo pipefail
OPENSEARCH_USER="admin"
OPENSEARCH_PASSWORD="YourStrongPassword123!" # <<< USE THE SAME PASSWORD
DASHBOARDS_URL="http://my-dashboards-opensearch-dashboards.default.svc.cluster.local:5601"
OPENSEARCH_URL="https://my-os-opensearch.default.svc.cluster.local:9200"
echo "Waiting for OpenSearch Dashboards to be available..."
until curl -s -u "$OPENSEARCH_USER:$OPENSEARCH_PASSWORD" -k "$DASHBOARDS_URL/api/status" | grep -q "available"; do
sleep 5
done
echo "OpenSearch Dashboards is available."
echo "Creating ISM policy: nginx_retention..."
curl -X PUT "$OPENSEARCH_URL/_plugins/_ism/policies/nginx_retention" \
-u "$OPENSEARCH_USER:$OPENSEARCH_PASSWORD" -k -H "Content-Type: application/json" \
-d '{
"policy": {
"description": "Delete logs after 7 days",
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [],
"transitions": [
{
"state_name": "delete",
"conditions": { "min_index_age": "7d" }
}
]
},
{
"name": "delete",
"actions": [ { "delete": {} } ],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": ["nginx-logs-*"],
"priority": 100
}
]
}
}'
echo "ISM policy created."
echo "Creating OpenSearch Dashboards Index Pattern: nginx-logs-pattern..."
curl -X POST "$DASHBOARDS_URL/api/saved_objects/index-pattern/nginx-logs-pattern" \
-u "$OPENSEARCH_USER:$OPENSEARCH_PASSWORD" -H "osd-xsrf: true" -H "Content-Type: application/json" \
-d '{
"attributes": {
"title": "nginx-logs-*",
"timeFieldName": "@timestamp"
}
}'
echo "Index pattern created."
---
apiVersion: batch/v1
kind: Job
metadata:
name: opensearch-observability-setup
spec:
template:
spec:
containers:
- name: setup-runner
image: curlimages/curl:latest # A lightweight image with curl and bash
command: ["bash", "/scripts/setup.sh"]
volumeMounts:
- name: setup-script
mountPath: /scripts
volumes:
- name: setup-script
configMap:
name: opensearch-sre-setup-script
defaultMode: 0744 # Make the script executable
restartPolicy: OnFailureApply the setup Job:
kubectl apply -f observability-setup-job.yamlBefore we fire off the job, let’s talk about what’s happening under the hood. We aren’t just pushing config; we are defining the lifecycle and visibility of our data.
nginx-logs-* into one continuous timeline so you can query across multiple days without lifting a finger.To see logs, your Nginx server needs visitors:
kubectl run load-gen --image=busybox --restart=Never -- /bin/sh -c "while true; do wget -qO- http://nginx-server; sleep 2; done"Port-forward Dashboards to your local machine:
kubectl port-forward svc/my-dashboards-opensearch-dashboards 5601:5601Then, open https://localhost:5601 in your browser. Log in with admin and your chosen password. Go to the “Discover” tab, select nginx-logs-* in the dropdown, set your time range (e.g., “Last 15 minutes”), and watch your logs flow in!
By following this automated approach, you’ve built a robust, observable, and easily reproducible log aggregation stack with OpenSearch. You’ve tackled critical SRE challenges like security, data ingestion, and lifecycle management—all as code. This hands-on experience forms a solid foundation for further exploration into metrics, traces, and advanced alerting in your cloud-native environments.
What other OpenSearch challenges will you automate next?
See the whole code at my repository
La entrada OpenSearch for SREs: The Open-Source Observability Powerhouse on Kubernetes se publicó primero en CloudArch.
]]>La entrada Helm Repositories: Your Gateway to Kubernetes Apps 🗂️⛵ se publicó primero en CloudArch.
]]>If Helm is the Kubernetes version of a package manager, then Helm repos are its treasure chests. And just like any good explorer, you’re going to need to know where to find the maps.

Let’s imagine you’re building a house in Kubernetes. Instead of crafting each brick by hand (writing all those YAMLs), you can order a ready-to-assemble kit. That kit? It’s called a Helm chart. And where do you get it from? A Helm repository.
A Helm repo is basically a collection of Helm charts — pre-packaged Kubernetes applications that are ready for deployment. These charts are stored in an online repository, which you can connect to and browse from your terminal.
Think of it like a Play Store or App Store, but for Kubernetes.
The Helm team maintains a default, stable repo full of widely-used applications: NGINX, MySQL, Prometheus, Grafana, WordPress… you name it. One of the most popular ones is from Bitnami, which packages and maintains a huge collection of up-to-date and secure charts.
But the real beauty is this: you can add any Helm repo to your local setup — official, third-party, or even your own private one.


Adding a Helm repo is as simple as a single command. For example, to add Bitnami’s public repository:
helm repo add bitnami https://charts.bitnami.com/bitnamiThat’s it. You’ve just connected your Helm CLI to a vast world of applications.
Want to make sure everything’s in sync?
helm repo updateThis command refreshes the list of available charts and their latest versions from all the repos you’ve added.
To check which repos you currently have on your machine:
helm repo listIt’ll show you a tidy little table with all your configured repositories. Nice and clean.
helm search 
Once you’ve added a repository — say Bitnami — and updated it, you’re probably thinking: “Cool… but what can I actually install?”
That’s where the magic of searching comes in.
You can use:
helm search repo wordpressAnd Helm will scan through all your added repositories and list any charts that match the name “wordpress”. It’ll even show you the latest version and a short description — kind of like browsing a menu at a restaurant, but for apps in your Kubernetes cluster
.
Want to see everything available from Bitnami? Just do:
helm search repo bitnamiAnd boom — a full buffet of deployable goodness.
This command is especially useful when you’re not quite sure what you’re looking for, or when you’re exploring new tools to add to your stack.


Now comes the fun part. Let’s say you want to install WordPress in your Kubernetes cluster (because why not launch a blog while you’re launching containers?
).
Installing any chart is as easy as using the helm install command following with some parameters:
helm install <name for your app, you choose it> <reponame_chart>Once you’ve added Bitnami’s repo, you can run:
helm install my-wordpress bitnami/wordpressBoom. Helm fetches the chart from the Bitnami repo, installs it into your cluster, and gives you all the necessary info to access it.
You don’t even need to download the chart locally unless you want to customize it (more on that in a future post
).

When you install a chart from a repo, Helm does a few things:
.tgz (tar.gz) package that contains all the YAML templates, values, and configuration.The best part? You didn’t touch a single YAML file.

Getting familiar with Helm repos is a crucial step in mastering Helm — and honestly, it’s where the fun begins. You now have access to hundreds of production-grade Kubernetes apps, just a command away.
But don’t stop here.
Next, we’re going to explore how to customize these charts to suit your environment, your values, and your style (yes, Kubernetes can have style
).
Until then, try playing with a few different charts. Install Redis, launch a full monitoring stack with Prometheus + Grafana, or spin up your own Jenkins CI system — all in just a few keystrokes.
Your cluster will thank you. 
Enjoying the series?
Make sure to follow, subscribe, or share this post with someone who still thinks Helm is just something you wear on a boat. 
#Helm #Kubernetes #DevOps #CloudNative #K8s #InfrastructureAsCode #HelmCharts
La entrada Helm Repositories: Your Gateway to Kubernetes Apps 🗂️⛵ se publicó primero en CloudArch.
]]>La entrada What is Helm? The Kubernetes Package Manager Explained for Beginners 🚀 se publicó primero en CloudArch.
]]>
Welcome to the first post in our Helm series! Whether you’re a DevOps engineer, cloud enthusiast, or just getting started with Kubernetes, you’re about to discover a powerful tool that can make your life way easier: Helm.
In this post, we’ll dive into:
Let’s jump right in!

Imagine managing a complex application in Kubernetes — dozens of YAML files, multiple services, deployments, secrets, configs, and everything in between. It’s like assembling IKEA furniture without the manual.
Helm is here to be your manual.
It’s the package manager for Kubernetes — just like apt is for Ubuntu or yum is for CentOS, but made for the cloud-native world.
With Helm, you can:
In short: Helm makes deploying to Kubernetes faster, simpler, and less error-prone.

Kubernetes is powerful, but managing it manually is like juggling flaming swords. Here are some real headaches Helm helps with:
1. Too many YAML files
Applications often require multiple resources: Deployments, Services, ConfigMaps, Ingresses, etc. Helm bundles them into one chart.
2. Hard-coded values
Editing the same YAML files over and over to change values (like image tags or environment settings)? Helm allows dynamic values with templates and variables.
3. No easy way to upgrade or rollback
With Helm, you can upgrade an app version and roll back instantly if something goes wrong.
4. App reuse across environments
Want the same app in dev, staging, and prod with just different configs? Helm makes it effortless.

Helm isn’t just a nice-to-have — it’s a must-have for scalable, maintainable Kubernetes environments.
Here’s why:
• Saves Time 
Automate and simplify deployments with one-liners.
• Improves Consistency
Avoid human error and deploy the same app across environments with confidence.
• Version Control Friendly
Helm charts can live in Git, making your infrastructure-as-code even more powerful.
• Easily Shareable
Share your charts with teammates or open source them for the community.
• Built-in Rollbacks
One bad deployment? Roll it back like it never happened.

Ready to get started? Installing Helm is quick and painless.
Step 1: Download the Helm Binary
For macOS:
brew install helmFor Linux:
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bashFor Windows:
Use Chocolatey or Scoop:
choco install kubernetes-helmStep 2: Verify the Installation
helm versionYou should see something like:
version.BuildInfo{Version:"v3.x.x", GitCommit:"...", ...}Boom — you’re ready to helm your ship! 
In the next post, we’ll break down what a Helm Chart really is, how it’s structured, and how to create your very first one.
If you’re enjoying this series, don’t forget to:
Until next time — keep it cloud-native! 
La entrada What is Helm? The Kubernetes Package Manager Explained for Beginners 🚀 se publicó primero en CloudArch.
]]>