Move redis config files out of old user-guide directory. (#7401)
This commit is contained in:
committed by
k8s-ci-robot
parent
ef6c7d8517
commit
c025e88e37
@@ -0,0 +1,2 @@
|
||||
maxmemory 2mb
|
||||
maxmemory-policy allkeys-lru
|
||||
@@ -0,0 +1,30 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: kubernetes/redis:v1
|
||||
env:
|
||||
- name: MASTER
|
||||
value: "true"
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
resources:
|
||||
limits:
|
||||
cpu: "0.1"
|
||||
volumeMounts:
|
||||
- mountPath: /redis-master-data
|
||||
name: data
|
||||
- mountPath: /redis-master
|
||||
name: config
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
- name: config
|
||||
configMap:
|
||||
name: example-redis-config
|
||||
items:
|
||||
- key: redis-config
|
||||
path: redis.conf
|
||||
@@ -34,11 +34,10 @@ This page provides a real world example of how to configure Redis using a Config
|
||||
|
||||
You can follow the steps below to configure a Redis cache using data stored in a ConfigMap.
|
||||
|
||||
1. Create a ConfigMap from the `docs/user-guide/configmap/redis/redis-config` file:
|
||||
1. Create a ConfigMap from the `docs/tutorials/configuration/configmap/redis/redis-config` file:
|
||||
|
||||
```shell
|
||||
kubectl create configmap example-redis-config --from-file=docs/user-guide/configmap/redis/redis-config
|
||||
|
||||
kubectl create configmap example-redis-config --from-file=https://k8s.io/docs/tutorials/configuration/configmap/redis/redis-config
|
||||
kubectl get configmap example-redis-config -o yaml
|
||||
```
|
||||
|
||||
@@ -95,7 +94,7 @@ You can follow the steps below to configure a Redis cache using data stored in a
|
||||
1. Create the pod:
|
||||
|
||||
```shell
|
||||
kubectl create -f docs/user-guide/configmap/redis/redis-pod.yaml
|
||||
kubectl create -f https://k8s.io/tutorials/configuration/configmap/redis/redis-pod.yaml
|
||||
```
|
||||
|
||||
In the example, the config volume is mounted at `/redis-master`.
|
||||
|
||||
Reference in New Issue
Block a user