Last active
November 24, 2018 14:24
-
-
Save dalmarcogd/bf67ed7bffc60e72d2d4c56cec14a3a3 to your computer and use it in GitHub Desktop.
Deploy Redis on GKE
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: redis | |
spec: | |
ports: | |
- port: 6379 | |
name: redis | |
clusterIP: None | |
selector: | |
app: redis | |
--- | |
apiVersion: apps/v1beta2 | |
kind: StatefulSet | |
metadata: | |
name: redis | |
spec: | |
selector: | |
matchLabels: | |
app: redis # has to match .spec.template.metadata.labels | |
serviceName: redis | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: redis # has to match .spec.selector.matchLabels | |
spec: | |
containers: | |
- name: redis | |
image: redis:5.0.1-alpine | |
imagePullPolicy: Always | |
# args: ["--requirepass", "$(REDIS_PASS)"] | |
ports: | |
- containerPort: 6379 | |
name: redis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment