OpenMCF logoOpenMCF

Loading...

Kubernetes Elastic Operator

Deploys the Elastic Cloud on Kubernetes (ECK) operator via its official Helm chart. ECK extends Kubernetes with custom resource definitions for managing Elasticsearch, Kibana, APM Server, Enterprise Search, Beats, Elastic Agent, Elastic Maps Server, and Fleet Server. Once installed, you can declaratively create and manage Elastic Stack deployments as native Kubernetes resources.

What Gets Created

When you deploy a KubernetesElasticOperator resource, OpenMCF provisions:

  • Namespace — created only when createNamespace is true; defaults to elastic-system if namespace is not specified
  • ECK Operator Helm Release — the eck-operator chart (v2.14.0) from https://helm.elastic.co, which installs:
    • The ECK operator Deployment with configurable CPU and memory limits
    • Custom Resource Definitions (CRDs) for Elasticsearch, Kibana, APM Server, Beats, Elastic Agent, Enterprise Search, Elastic Maps Server, and Fleet Server
    • ServiceAccount, ClusterRole, and ClusterRoleBinding for operator RBAC
    • ValidatingWebhookConfiguration for CRD validation
    • Operator Service for webhook endpoints
  • Kubernetes Labels — standard OpenMCF labels (resource, resource-name, resource-kind, resource-id, organization, environment) are propagated as inherited labels so that all Elastic Stack resources created by the operator carry consistent metadata

Prerequisites

  • A Kubernetes cluster with kubectl configured for access
  • Cluster-admin permissions to install CRDs and ClusterRoles required by the operator
  • Kubernetes 1.25+ recommended for full ECK 2.14 compatibility

Quick Start

Create a file elastic-operator.yaml:

apiVersion: kubernetes.openmcf.org/v1
kind: KubernetesElasticOperator
metadata:
  name: eck
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.KubernetesElasticOperator.eck
spec:
  namespace:
    value: elastic-system
  createNamespace: true
  container:
    resources:
      limits:
        cpu: "1000m"
        memory: "1Gi"
      requests:
        cpu: "50m"
        memory: "100Mi"

Deploy:

openmcf apply -f elastic-operator.yaml

This installs the ECK operator in the elastic-system namespace with default resource allocations. After deployment, you can create Elasticsearch and Kibana custom resources in any namespace.

Configuration Reference

Required Fields

FieldTypeDescriptionValidation
namespaceStringValueOrRefKubernetes namespace for the operator deployment. Use value for a direct string or valueFrom to reference a KubernetesNamespace resource. Defaults to elastic-system when omitted.Required
containerobjectContainer specification for the operator pod, including resource limits and requests.Required

Optional Fields

FieldTypeDefaultDescription
targetCluster.clusterKindenum—Kubernetes cluster kind. Valid values: AwsEksCluster, GcpGkeCluster, AzureAksCluster, DigitalOceanKubernetesCluster, CivoKubernetesCluster.
targetCluster.clusterNamestring—Name of the target Kubernetes cluster in the same environment.
createNamespaceboolfalseCreate the namespace before deploying the operator. Set to true when the namespace does not already exist.
container.resources.limits.cpustring"1000m"CPU limit for the ECK operator container.
container.resources.limits.memorystring"1Gi"Memory limit for the ECK operator container.
container.resources.requests.cpustring"50m"CPU request for the ECK operator container.
container.resources.requests.memorystring"100Mi"Memory request for the ECK operator container.

Examples

Minimal Operator Installation

Install ECK with defaults in the elastic-system namespace:

apiVersion: kubernetes.openmcf.org/v1
kind: KubernetesElasticOperator
metadata:
  name: eck
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.KubernetesElasticOperator.eck
spec:
  namespace:
    value: elastic-system
  createNamespace: true
  container: {}

Operator with Increased Resources

Deploy the operator with higher resource allocations for clusters running many Elastic Stack instances:

apiVersion: kubernetes.openmcf.org/v1
kind: KubernetesElasticOperator
metadata:
  name: eck-prod
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: prod.KubernetesElasticOperator.eck-prod
spec:
  namespace:
    value: elastic-system
  createNamespace: true
  container:
    resources:
      limits:
        cpu: "2000m"
        memory: "2Gi"
      requests:
        cpu: "500m"
        memory: "512Mi"

Operator in a Custom Namespace with Foreign Key Reference

Install the operator in an OpenMCF-managed namespace using a valueFrom reference:

apiVersion: kubernetes.openmcf.org/v1
kind: KubernetesElasticOperator
metadata:
  name: eck-shared
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: staging.KubernetesElasticOperator.eck-shared
spec:
  namespace:
    valueFrom:
      kind: KubernetesNamespace
      name: platform-operators
      field: spec.name
  container:
    resources:
      limits:
        cpu: "1000m"
        memory: "1Gi"
      requests:
        cpu: "100m"
        memory: "256Mi"

Stack Outputs

After deployment, the following outputs are available in status.outputs:

OutputTypeDescription
namespacestringKubernetes namespace where the ECK operator is deployed
servicestringName of the Kubernetes Service for the ECK operator (format: {name}-eck-operator)
portForwardCommandstringReady-to-run kubectl port-forward command for local access to the operator
kubeEndpointstringCluster-internal endpoint (e.g., eck-eck-operator.elastic-system.svc.cluster.local)
ingressEndpointstringPublic endpoint for external access, when configured

Related Components

  • KubernetesNamespace — pre-create a namespace to reference via valueFrom
  • KubernetesElasticsearch — deploy Elasticsearch clusters managed by this operator
  • KubernetesHelmRelease — alternative approach for deploying Helm charts with full value control

Next article

Kubernetes Elasticsearch

Kubernetes Elasticsearch Deploys an Elasticsearch cluster on Kubernetes using the Elastic Cloud on Kubernetes (ECK) operator, with optional Kibana, configurable data persistence via PersistentVolumeClaims, and optional external access through Gateway API ingress with automatic TLS certificate provisioning and HTTP-to-HTTPS redirect. What Gets Created When you deploy a KubernetesElasticsearch resource, OpenMCF provisions: Namespace — created only when createNamespace is true Elasticsearch...
Read next article
Presets
1 ready-to-deploy configurationView presets →