YAML範本:redis-master-controller.yaml
apiVersion: v1 kind: ReplicationController metadata: name: redis-master labels: name: redis-master spec: replicas: 1 selector: name: redis-master template: metadata: labels: name: redis-master spec: containers: - name: master image: kubeguide/redis-master ports: - containerPort: 6379
建立這個Pod
kubectl create -f redis-master-controller.yaml
查看這個ReplicationController
kubectl get rc
查看現有的Pod
kubectl get pods
查看現有ReplicationController的狀態
kubectl describe rc frontend