-
-
Save cdsap/46cedbc33452856c8a93d8b39468b31d to your computer and use it in GitHub Desktop.
Remote Cache with Redis and K8s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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