*컨트롤러 종류

*Replication Controller
요구하는 pod의 개수를 보장하며 파드집합의 실행을 항상 안정적으로 유지하는 것을 목표

ReplicationController-definition

*Replication Controller 실습예제
kubectl create -f rc-nginx.yaml
kubectl get replicationcontrollers
(=kubectl get rc)
kubectl describe rc rc-nginx
kubectl run redis --image=redis --labels=app=webui --dry-run > redis.yaml
kubectl get pod --show-labels
kubectl create -f redis.yaml
kubectl edit rc rc-nginx
kubectl scale rc rc-nginx --replicas=2
ReplicationController 문제

[solution]
apiVersion: v1
kind: ReplicationController
metadata:
labels:
app: main
name: apache
rel: stable
name: rc-mainui
spec:
replicas: 3
selector:
app: main
name: apache
rel: stable
template:
metadata:
labels:
app: main
name: apache
rel: stable
name: mainui
spec:
containers:
- image: httpd:2.2
name: mainui
'Kubernetes' 카테고리의 다른 글
Deployment (0) | 2022.01.10 |
---|---|
ReplicaSet (0) | 2022.01.10 |
H/W resource 관리 (0) | 2022.01.07 |
livenessProbe (0) | 2022.01.07 |
Kubernetes namespace (0) | 2022.01.05 |