cloudserver
cloudserver copied to clipboard
s3server fails to start in k8s
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
@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).
- 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"
- 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
- 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.