change the way to create ConfigMap (#9903)
This commit is contained in:
@@ -35,10 +35,22 @@ 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.
|
You can follow the steps below to configure a Redis cache using data stored in a ConfigMap.
|
||||||
|
|
||||||
First create a ConfigMap from the `examples/pods/config/redis-config` file:
|
First create a ConfigMap from the `redis-config` file:
|
||||||
|
|
||||||
|
{{< codenew file="pods/config/redis-config" >}}
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -OL https://k8s.io/examples/pods/config/redis-config
|
||||||
|
kubectl create configmap example-redis-config --from-file=redis-config
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
configmap/example-redis-config created
|
||||||
|
```
|
||||||
|
|
||||||
|
Examine the created ConfigMap:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl create configmap example-redis-config --from-file=https://k8s.io/examples/pods/config/redis-config
|
|
||||||
kubectl get configmap example-redis-config -o yaml
|
kubectl get configmap example-redis-config -o yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user