Coder Social home page Coder Social logo

hatamiarash7 / kubernetes-redis Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 52 KB

Deploy Redis cluster in Kubernetes

Home Page: https://arash-hatami.ir/redis-cluster-in-kubernetes/

License: GNU General Public License v3.0

Dockerfile 100.00%
kubernetes redis redis-cluster redis-database cluster clustering database replica replica-set

kubernetes-redis's Introduction

Kubernetes Redis Cluster

Deploy Redis cluster in Kubernetes

DockerImage-Github DockerImage-Dockerhub

Install

کاربران فارسی زبان جهت اطلاعات بیشتر به این پست مراجعه کنند :

راه اندازی کلاستر Redis

Redis Cluster requires at least 3 master nodes, so we have 6 replicas here ( 3 master / 3 slave )

kubectl apply -f statefulset.yml
kubectl apply -f service.yml

Make cluster

You should scale the cluster up or down manually

Get cluster nodes

kubectl get pods -l app=redis-cluster -o jsonpath='{range.items[*]}{.status.podIP}:6379 '

Now we are going to create the cluster ( assign master/slave roles, distribute slot maps) using the redis-cli --cluster create script.

Since we are going create 3 masters cluster with 3 dedicated slaves, the --cluster-replicas 1 flag is passed.

kubectl exec -it redis-cluster-0 -- redis-cli --cluster create --cluster-replicas 1 <<< node list from previous command >>>

Or you can merge command like this :

kubectl exec -it redis-cluster-0 -- redis-cli --cluster create --cluster-replicas 1 $(kubectl get pods -l app=redis-cluster -o jsonpath='{range.items[*]}{.status.podIP}:6379 ')

Support

ko-fi

Contributing

  1. Fork it !
  2. Create your feature branch : git checkout -b my-new-feature
  3. Commit your changes : git commit -am 'Add some feature'
  4. Push to the branch : git push origin my-new-feature
  5. Submit a pull request :D

Issues

Each project may have many problems. Contributing to the better development of this project by reporting them.

kubernetes-redis's People

Contributors

hatamiarash7 avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sarojkanta0704

kubernetes-redis's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

dockerfile
docker/Dockerfile
github-actions
.github/workflows/docker-publish-dockerhub.yml
  • actions/checkout v4
  • actions/checkout v4
.github/workflows/docker-publish-github.yml
  • actions/checkout v4
  • actions/checkout v4

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.