Skip to content

Instantly share code, notes, and snippets.

@cdsap
Last active March 24, 2020 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdsap/46cedbc33452856c8a93d8b39468b31d to your computer and use it in GitHub Desktop.
Save cdsap/46cedbc33452856c8a93d8b39468b31d to your computer and use it in GitHub Desktop.
Remote Cache with Redis and K8s
kubectl apply -f https://k8s.io/examples/application/guestbook/redis-master-deployment.yaml
kubectl apply -f https://k8s.io/examples/application/guestbook/redis-master-service.yaml
kubectl apply -f https://k8s.io/examples/application/guestbook/redis-slave-deployment.yaml
kubectl apply -f https://k8s.io/examples/application/guestbook/redis-slave-service.yaml
kubectl expose deployment redis-master --type=LoadBalancer --name=my-service
buildscript {
repositories {
mavenLocal()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'gradle.plugin.net.idlestate:gradle-redis-build-cache:1.2.1'
}
}
buildCache {
local {
enabled = false
}
registerBuildCacheService(net.idlestate.gradle.caching.RedisBuildCache.class,
net.idlestate.gradle.caching.RedisBuildCacheServiceFactory.class)
remote( net.idlestate.gradle.caching.RedisBuildCache.class ) {
host = 'xxxx'
port = 6379
enabled = true
push = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment