Closed 522623905 closed 2 years ago
操作,想部署主备: kubectl apply -f deploy.yaml kubectl apply -f redis_standby.yaml
[root@localhost td-redis]# kubectl get all -n redis NAME READY STATUS RESTARTS AGE pod/operator-7785578894-swjwg 1/1 Running 0 15h pod/redis-standby-tom-0 1/2 Running 60 (15m ago) 15h pod/sentinel-standby-tom-0 1/1 Running 171 (43s ago) 15h pod/sentinel-standby-tom-1 1/1 Running 175 (41s ago) 15h pod/sentinel-standby-tom-2 1/1 Running 173 (39s ago) 15h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/redis-standby-tom ClusterIP 10.96.120.210 6379/TCP 15h service/sentinel-standby-tom ClusterIP 10.97.94.185 26379/TCP 15h
NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/operator 1/1 1 1 15h
NAME DESIRED CURRENT READY AGE replicaset.apps/operator-7785578894 1 1 1 15h
NAME READY AGE statefulset.apps/redis-standby-tom 0/2 15h statefulset.apps/sentinel-standby-tom 3/3 15h
執行kuebctl describe redis-standby-tom-0 -n redis顯示什麼呢?
kuebctl describe redis-standby-tom-0 -n redis
能提供更加詳細一些的資訊麼? 比如k8s的版本、redis的一些報錯的日誌、pod的事件提示之類的。
操作,想部署主备: kubectl apply -f deploy.yaml kubectl apply -f redis_standby.yaml
[root@localhost td-redis]# kubectl get all -n redis NAME READY STATUS RESTARTS AGE pod/operator-7785578894-swjwg 1/1 Running 0 15h pod/redis-standby-tom-0 1/2 Running 60 (15m ago) 15h pod/sentinel-standby-tom-0 1/1 Running 171 (43s ago) 15h pod/sentinel-standby-tom-1 1/1 Running 175 (41s ago) 15h pod/sentinel-standby-tom-2 1/1 Running 173 (39s ago) 15h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/redis-standby-tom ClusterIP 10.96.120.210 6379/TCP 15h
service/sentinel-standby-tom ClusterIP 10.97.94.185 26379/TCP 15h
NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/operator 1/1 1 1 15h
NAME DESIRED CURRENT READY AGE replicaset.apps/operator-7785578894 1 1 1 15h
NAME READY AGE statefulset.apps/redis-standby-tom 0/2 15h statefulset.apps/sentinel-standby-tom 3/3 15h