1 개요[ | ]
- helm install
Console
Copy
master:~$ helm install stable/redis
NAME: foiled-shrimp
LAST DEPLOYED: Sat Mar 23 19:47:33 2019
NAMESPACE: default
STATUS: DEPLOYED
RESOURCES:
==> v1beta2/StatefulSet
NAME DESIRED CURRENT AGE
foiled-shrimp-redis-master 1 1 0s
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
foiled-shrimp-redis-slave-769765cb44-npmfd 0/1 ContainerCreating 0 0s
foiled-shrimp-redis-master-0 0/1 Pending 0 0s
==> v1/Secret
NAME TYPE DATA AGE
foiled-shrimp-redis Opaque 1 0s
==> v1/ConfigMap
NAME DATA AGE
foiled-shrimp-redis 3 0s
foiled-shrimp-redis-health 3 0s
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
foiled-shrimp-redis-master ClusterIP 10.107.151.156 <none> 6379/TCP 0s
foiled-shrimp-redis-slave ClusterIP 10.96.167.183 <none> 6379/TCP 0s
==> v1beta1/Deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
foiled-shrimp-redis-slave 1 1 1 0 0s
NOTES:
** Please be patient while the chart is being deployed **
Redis can be accessed via port 6379 on the following DNS names from within your cluster:
foiled-shrimp-redis-master.default.svc.cluster.local for read/write operations
foiled-shrimp-redis-slave.default.svc.cluster.local for read-only operations
To get your password run:
export REDIS_PASSWORD=$(kubectl get secret --namespace default foiled-shrimp-redis -o jsonpath="{.data.redis-password}" | base64 --decode)
To connect to your Redis server:
1. Run a Redis pod that you can use as a client:
kubectl run --namespace default foiled-shrimp-redis-client --rm --tty -i --restart='Never' \
--env REDIS_PASSWORD=$REDIS_PASSWORD \
--image docker.io/bitnami/redis:4.0.14 -- bash
2. Connect using the Redis CLI:
redis-cli -h foiled-shrimp-redis-master -a $REDIS_PASSWORD
redis-cli -h foiled-shrimp-redis-slave -a $REDIS_PASSWORD
To connect to your database from outside the cluster execute the following commands:
kubectl port-forward --namespace default svc/foiled-shrimp-redis 6379:6379 &
redis-cli -h 127.0.0.1 -p 6379 -a $REDIS_PASSWORD
2 같이 보기[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.