Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3server fails to start in k8s #1723

Open
odedpriva opened this issue Feb 27, 2019 · 1 comment
Open

s3server fails to start in k8s #1723

odedpriva opened this issue Feb 27, 2019 · 1 comment
Labels

Comments

@odedpriva
Copy link

General support information

When creating a pod on k8s ( running on EKS ) the s3server fail to start with the below error

error: syntax error, unexpected ':', expecting $end
. | .localCache.port=tcp://172.20.107.106:6379                        1 compile error

pod configuration

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: s3
  labels:
    service: s3
spec:
  replicas: 1
  selector:
    matchLabels:
      service: s3
  template:
    metadata:
      labels:
        service: s3
    spec:
      containers:
        - image: scality/s3server:mem-latest
          name: s3
          ports:
            - containerPort: 8000
@ssalaues
Copy link

ssalaues commented Apr 16, 2019

@odedpriva Sorry for the late response. The error is because it is looking for a redis host to use. There's a few options you can go with here (including if you don't want to use a redis db).

  1. You can add these Env Vars to your deployment to specify an existing redis host/port to use.
    env:
        - name: REDIS_HOST
          value: "redis-host"
        - name: REDIS_PORT
          value: "6379"
  1. You can add a redis side car to your s3 pod ( this wont scale in replicas since each cloudserver replica would be unique from the others). You can see the example our Kubernetes CI uses here
    - name: redis
      image: redis:alpine
      imagePullPolicy: IfNotPresent
      resources:
        requests: # These are just the resources needed by our CI but should be configured accordingly
          cpu: 100m
          memory: 128Mi
        limits:
          cpu: 200m
          memory: 128Mi
  1. Or if you're trying to use it completely standalone as single replica (no external DB required). We have a good example of how this is used along with a service in another K8s CI here
        - image: zenko/cloudserver
          name: s3
          ports:
            - containerPort: 8000
          env:
            - name: REMOTE_MANAGEMENT_DISABLE
               value: "1"

Note that the zenko/cloudserver is simply the latest version of scality/s3server

It seems like you're just trying to get a single instance running in K8s so either of the above options can work. If you are looking to have a highly available and scale out solution I would suggest looking into our Kubernetes Helm Chart at stable/cloudserver which bootstraps everything needed to install directly onto a K8s cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants