elastic / package-registry

Elastic Package Registry (EPR)
Other
9 stars 67 forks source link

Support deploying own ERP container on K8s via ECK #783

Open a03nikki opened 2 years ago

a03nikki commented 2 years ago

The documentation describes how to run a EPR (Elastic Package Registry) using Docker. It would be great if ECK (Elastic Cloud on Kubernetes) could deploy the container to a Kubernetes (K8s) cluster.

Related documentation: https://www.elastic.co/guide/en/integrations-developer/current/air-gapped.html#air-gapped-diy-epr Related issue: https://github.com/elastic/cloud-on-k8s/issues/5107

Kushmaro commented 2 years ago

Hey @a03nikki :) heard about this and thought I'd investigate Is there any specific value in ECK doing this, vs. just deployment of the EPR container regularly on k8s?

a03nikki commented 1 year ago

@Kushmaro : ECK could do the configuration for Kibana to use the custom EPR endpoint as the pod would then be controlled by the operator.

If it won't be done, it would be nice to have the K8s "best practice for deploying an ERP pod" in the documentation somewhere.

omlet05 commented 11 months ago

On my side I did something like this to run EPR on Kubernetes. Could you add something similar (or better) to the documentation? Or maybe provide a helm deployment?

apiVersion: apps/v1
kind: Deployment
metadata:
  name: elastic-package-registry-deployment
spec:
  selector:
    matchLabels:
      app: elastic-package-registry
  replicas: 1
  template:
    metadata:
      labels:
        app: elastic-package-registry
    spec:
      containers:
      - name: elastic-package-registry
        image: docker.elastic.co/package-registry/distribution:8.11.1
        imagePullPolicy: Always
        resources:
          limits:
            memory: "1024Mi"
            cpu: 1
          requests:
            memory: "1024Mi"
            cpu: 100m
      securityContext:
        runAsUser: 1000
        runAsGroup: 1000
        fsGroup: 1000
apiVersion: v1
kind: Service
metadata:
  name: elastic-package-registry-http
  labels:
    run: elastic-package-registry
spec:
  ports:
  - protocol: TCP
    port: 80
    targetPort: 8080
  selector:
    app: elastic-package-registry
QuinnBast commented 2 months ago

Agreed. Or even better, add it to the ECK operator