DMCA.com Protection Status Trending Topics About Devops: ReplicaSet Kubernetes

Wednesday, 2 June 2021

ReplicaSet Kubernetes

vi moon.yml

______________________________________________________

 apiVersion: apps/v1

kind: ReplicaSet

metadata:

  name: abid-moon

  labels:

    app: guestbook

    tier: frontend

spec:

  # modify replicas according to your case

  replicas: 3

  selector:

    matchLabels:

      tier: frontend

  template:

    metadata:

      labels:

        tier: frontend

    spec:

      containers:

      - name: moon-solutions

        image: nginx




++++++++++++++++++++++++++++++++++++++++++++++++++


apiVersion: v1

kind: Pod

metadata:

  name: pod2

  labels:

    app: guestbook

spec:

  containers:

     - name: podngin

       image: nginx

~                        


++++++++++++++++++++++++++++++++

execute file:     kubectl apply -f  moon.yml
_________________________________________________________

delete RS: kubectl delete rs abid-moon

+++++++++++++++++++++++++++++++


apiVersion: v1

kind: Pod

metadata:

  name: pod2

  labels:

    tier:  frontend

spec:

  containers:

     - name: podngin

       image: nginx



+++++++++++++++++++++++++++++++++++



~                        

No comments: