[쿠버네티스 워크로드] 레플리케이션 컨트롤러 실습

IMKUNYOUNG·2023년 7월 31일
0

쿠버네티스

목록 보기
27/64
kubectl get rc
kubectl delete pod http-go-897c8
kubectl label pod http-go-g42gm app-
kubectl get pod -o wide
kubectl get nodes
kubectl get rc -o wide
kubectl get rc http-go -o wide
kubectl delete rc http-go
kubectl scale rc http-go --replicas=5
kubectl edit rc http-go
kubectl apply -f http-go-rc-v2.yaml


http-go-rc.yaml

apiVersion: v1
kind: ReplicationController
metadata:
  name: http-go
spec:
  replicas: 3
  selector:
    app: http-go
  template:
    metadata:
      name: http-go
      labels:
        app: http-go
    spec:
      containers:
      - name: http-go
        image: gasbugs/http-go
        ports:
        - containerPort: 8080

0개의 댓글