Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 811 Bytes

File metadata and controls

45 lines (37 loc) · 811 Bytes

Chapter 4

  1. To create the RC via
$ kubectl create -f kubapp-rc.yaml
  1. To add and remove labels from the pod (so pod will be removed from the scope of RC) run
$ kubectl label pod <pods name> type=special
$ kubectl label pod <pods name> app=kubapp2 --overwrite
$ kubectl get po
  1. To scale your RC up run
$ kubectl scale rc kubapp --replicas=10
  1. To delete the RC without all pods, run:
$ kubectl delete rc kubapp --cascade=false
  1. To start a new ReplicaSet run
$ kubectl create -f kubapp-rs.yaml
  1. To check the information about your ReplicaSet run:
$ kubectl describe rs
  1. Example of scheduled job:
apiVersion: batch/v2alpha1
kind: CronJob
spec:
  schedule: "0 3 * * *"
  startingDeadlineSeconds: 15
...