首次提交:初始化项目
This commit is contained in:
17
010-中间件/001-redis/deploy.sh
Normal file
17
010-中间件/001-redis/deploy.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 创建命名空间
|
||||
kubectl create namespace redis
|
||||
|
||||
# 部署 Redis
|
||||
kubectl apply -f redis-deployment.yaml
|
||||
|
||||
# 等待 Redis 启动
|
||||
echo "等待 Redis 启动..."
|
||||
kubectl wait --for=condition=ready pod -l app=redis -n redis --timeout=300s
|
||||
|
||||
# 显示状态
|
||||
echo "Redis 部署完成!"
|
||||
kubectl get pods -n redis
|
||||
kubectl get pvc -n redis
|
||||
kubectl get svc -n redis
|
||||
Reference in New Issue
Block a user