Comments (4)
Alright, since I don't need redis-trib to actually be installed on the redis nodes themselves, I changed my setup a little:
The statefulset now references redis:latest from docker hub
kubectl create -f config.yml
kubectl create -f service.yml
kubectl create -f statefulset.yml
# create redis-trib pod so we can join the redis pods together
kubectl run redistrib --image=zvelo/redis-trib --command -- tail -f /etc/hosts
# tell redistrib to join the pods
REDIS_PODS=$(kubectl get pods -l app=redis-cluster -o jsonpath='{range.items[*]}{.status.podIP}:6379 ')
REDISTRIB=$(kubectl get pods -l run=redistrib -o jsonpath='{range.items[*]}{.metadata.name}')
kubectl exec -it $REDISTRIB bash
# in sub-shell
./redis-trib.rb create --replicas 1 $REDIS_PODS
Then I can delete the redistrib deployment until I need it later (if I need it later).
Thanks for getting me started :)
from redis-cluster.
I'm not sure what the gem install redis
was about so I removed that from the Dockerfile and it builds and runs. Also needed to install wget.
New Dockerfile
FROM redis
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update \
&& apt-get -y upgrade \
&& apt-get -y autoremove \
&& apt-get -y clean \
&& apt-get install -y wget
RUN wget -O /usr/local/bin/redis-trib http://download.redis.io/redis-stable/src/redis-trib.rb
RUN chmod 755 /usr/local/bin/redis-trib
CMD redis-server
from redis-cluster.
Ah! redis-trib needs redis :) so that doesn't totally work.
from redis-cluster.
Thanks for opening the issue, I wasn't aware that this had become an issue. Anyway, I believe the easiest solution would be to pin the redis
gem to a version that works with the ruby version shipped with Jessie.
I particularly like your solution too, having a dedicated pod for redis-trib instead of shipping it with all the others. This way you can run it as needed and don't have a Dockerfile to maintain. Thanks!
from redis-cluster.
Related Issues (16)
- Auto-start of HOT 8
- Storage class missing HOT 2
- Waiting for the cluster to join(k8s1.10,flannel-v0.10.0) HOT 2
- if you use Flannel network in k8s,you can't success HOT 1
- need requirepass HOT 1
- It should be $(HOSTNAME) but not $(hostname) HOT 3
- Waiting for the cluster to join takes forever.... HOT 4
- Auto-Scaling HOT 1
- redis5.0.4 problem with GOSSIP
- error building docker image, HOT 9
- clusterIP is None HOT 3
- Docker image missing? HOT 2
- statefulset failover IP change HOT 2
- Issue with Initializing the cluster. HOT 1
- ${POD_IP} in /data/nodes.conf HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis-cluster.