Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Managing Redis with
Kubernetes
RedisConf 2016
@kelseyhightower
Goals
• Spark your interest in Kubernetes
• Understand what Kubernetes can and can’t
do for Redis Clusters
Redis Cluster
• Automatically split your dataset among
multiple nodes
• Continue operations when a subset of the
nodes are...
Redis Cluster
master
0 - 5460
slave slave slave
master
5461-10922
master
10923-16383
Redis Cluster - Detect Failures
master
0 - 5460
slave slave slave
master
5461-10922
master
10923-16383
Redis Cluster - Auto Recovery
master
0 - 5460
slave slave slave
master
5461-10922
master
10923-16383
Redis Cluster - Scale
master
0 - 5460
slave slave slave
master
5461-10922
master
10923-16383
slave
master
0
Redis Cluster - Deployment Challenges
• No support for remapping of IPs or ports
• Configuration file distribution
• Servi...
Kubernetes
Kubernetes
• Not a PaaS
• Framework for building distributed systems
• Declarative application management
platform
Kubernetes - Scheduling (Bin Packing)
node 1 node 2 node 3 node 4
● Use for standalone Redis instances
● Increase single n...
Kubernetes - Scheduling (Bin Packing)
node 1 node 2 node 3 node 4
● Use for standalone Redis instances
● Increase single n...
Kubernetes - Scheduling (Bin Packing)
node 1 node 2 node 3 node 4
● Use for standalone Redis instances
● Increase single n...
Kubernetes - Scheduling (Bin Packing)
node 1 node 2 node 3 node 4
● Use for standalone Redis instances
● Increase single n...
Kubernetes - Scheduling (Bin Packing)
node 1 node 2 node 3 node 4
● Use for standalone Redis instances
● Increase single n...
Kubernetes - Scheduling (Spread)
node 1 node 2 node 3 node 4
● Use for Redis cluster instances
● Increase availability
Kubernetes - Scheduling (Spread)
node 1 node 2 node 3 node 4
● Use for Redis cluster instances
● Increase availability
Kubernetes - Scheduling (Spread)
node 1 node 2 node 3 node 4
● Use for Redis cluster instances
● Increase availability
Kubernetes - Scheduling (Spread)
node 1 node 2 node 3 node 4
● Use for Redis cluster instances
● Increase availability
Kubernetes - Scheduling (Spread)
node 1 node 2 node 3 node 4
● Use for Redis cluster instances
● Increase availability
Pods
Logical Application
• One or more containers
and volumes
• Shared namespaces
• One IP per pod
Pod
redis
ConfigGCE
10....
Drives current state towards desired state
app: redis
replicas: 1
ReplicaSets
node 1 node 2 node 3 node 4
Drives current state towards desired state
app: redis
replicas: 1
ReplicaSets
node 1 node 2 node 3 node 4
Drives current state towards desired state
app: redis
replicas: 1
ReplicaSets
node 1 node 2 node 3 node 4
Drives current state towards desired state
app: redis
replicas: 1
ReplicaSets
node 1 node 2 node 3 node 4
Services
Provide a stable endpoint for one or more pods
node 1 node 2 node 3 node 4
Services
Provide a stable endpoint for one or more pods
node 1 node 2 node 3 node 4
labels:
app: redis
Services
Provide a stable endpoint for one or more pods
node 1 node 2 node 3 node 4
redis
labels:
app: redis
10.131.246.27
Services
Provide a stable endpoint for one or more pods
node 1 node 2 node 3 node 4
labels:
app: redis
name: redis-1
Services
Provide a stable endpoint for one or more pods
node 1 node 2 node 3 node 4
labels:
app: redis
name: redis-1
redis...
node 2
Services
Provide a stable endpoint for one or more pods
node 1 node 3 node 4
redis-1 10.131.242.1
labels:
app: redi...
Services
Provide a stable endpoint for one or more pods
node 1 node 2 node 3 node 4
redis-2redis-1 redis-3 redis-4
Services
Provide a stable endpoint for one or more pods
node 1 node 2 node 3 node 4
redis-1 redis-2 redis-3 redis-4
redis
Demo
Upcoming SlideShare
Loading in …5
×

Managing Redis with Kubernetes - Kelsey Hightower, Google

6,975 views

Published on

Managing Redis with Kubernetes - Kelsey Hightower

Published in: Technology
  • Follow the link, new dating source: ♥♥♥ http://bit.ly/39sFWPG ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ❶❶❶ http://bit.ly/39sFWPG ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Managing Redis with Kubernetes - Kelsey Hightower, Google

  1. 1. Managing Redis with Kubernetes RedisConf 2016 @kelseyhightower
  2. 2. Goals • Spark your interest in Kubernetes • Understand what Kubernetes can and can’t do for Redis Clusters
  3. 3. Redis Cluster • Automatically split your dataset among multiple nodes • Continue operations when a subset of the nodes are experiencing failures
  4. 4. Redis Cluster master 0 - 5460 slave slave slave master 5461-10922 master 10923-16383
  5. 5. Redis Cluster - Detect Failures master 0 - 5460 slave slave slave master 5461-10922 master 10923-16383
  6. 6. Redis Cluster - Auto Recovery master 0 - 5460 slave slave slave master 5461-10922 master 10923-16383
  7. 7. Redis Cluster - Scale master 0 - 5460 slave slave slave master 5461-10922 master 10923-16383 slave master 0
  8. 8. Redis Cluster - Deployment Challenges • No support for remapping of IPs or ports • Configuration file distribution • Service discovery • Volume management
  9. 9. Kubernetes
  10. 10. Kubernetes • Not a PaaS • Framework for building distributed systems • Declarative application management platform
  11. 11. Kubernetes - Scheduling (Bin Packing) node 1 node 2 node 3 node 4 ● Use for standalone Redis instances ● Increase single node resource utilization
  12. 12. Kubernetes - Scheduling (Bin Packing) node 1 node 2 node 3 node 4 ● Use for standalone Redis instances ● Increase single node resource utilization
  13. 13. Kubernetes - Scheduling (Bin Packing) node 1 node 2 node 3 node 4 ● Use for standalone Redis instances ● Increase single node resource utilization
  14. 14. Kubernetes - Scheduling (Bin Packing) node 1 node 2 node 3 node 4 ● Use for standalone Redis instances ● Increase single node resource utilization
  15. 15. Kubernetes - Scheduling (Bin Packing) node 1 node 2 node 3 node 4 ● Use for standalone Redis instances ● Increase single node resource utilization
  16. 16. Kubernetes - Scheduling (Spread) node 1 node 2 node 3 node 4 ● Use for Redis cluster instances ● Increase availability
  17. 17. Kubernetes - Scheduling (Spread) node 1 node 2 node 3 node 4 ● Use for Redis cluster instances ● Increase availability
  18. 18. Kubernetes - Scheduling (Spread) node 1 node 2 node 3 node 4 ● Use for Redis cluster instances ● Increase availability
  19. 19. Kubernetes - Scheduling (Spread) node 1 node 2 node 3 node 4 ● Use for Redis cluster instances ● Increase availability
  20. 20. Kubernetes - Scheduling (Spread) node 1 node 2 node 3 node 4 ● Use for Redis cluster instances ● Increase availability
  21. 21. Pods Logical Application • One or more containers and volumes • Shared namespaces • One IP per pod Pod redis ConfigGCE 10.128.7.4 /etc/redis/redis.conf /var/lib/redis
  22. 22. Drives current state towards desired state app: redis replicas: 1 ReplicaSets node 1 node 2 node 3 node 4
  23. 23. Drives current state towards desired state app: redis replicas: 1 ReplicaSets node 1 node 2 node 3 node 4
  24. 24. Drives current state towards desired state app: redis replicas: 1 ReplicaSets node 1 node 2 node 3 node 4
  25. 25. Drives current state towards desired state app: redis replicas: 1 ReplicaSets node 1 node 2 node 3 node 4
  26. 26. Services Provide a stable endpoint for one or more pods node 1 node 2 node 3 node 4
  27. 27. Services Provide a stable endpoint for one or more pods node 1 node 2 node 3 node 4 labels: app: redis
  28. 28. Services Provide a stable endpoint for one or more pods node 1 node 2 node 3 node 4 redis labels: app: redis 10.131.246.27
  29. 29. Services Provide a stable endpoint for one or more pods node 1 node 2 node 3 node 4 labels: app: redis name: redis-1
  30. 30. Services Provide a stable endpoint for one or more pods node 1 node 2 node 3 node 4 labels: app: redis name: redis-1 redis-1 10.131.242.1
  31. 31. node 2 Services Provide a stable endpoint for one or more pods node 1 node 3 node 4 redis-1 10.131.242.1 labels: app: redis name: redis-1
  32. 32. Services Provide a stable endpoint for one or more pods node 1 node 2 node 3 node 4 redis-2redis-1 redis-3 redis-4
  33. 33. Services Provide a stable endpoint for one or more pods node 1 node 2 node 3 node 4 redis-1 redis-2 redis-3 redis-4 redis
  34. 34. Demo

×