Once you deploy a pod, kubernetes monitors the pod health and if something goes wrong, new pod is created . How is this working internally. After deployment, where is kubernetes storing the deployment yaml.
Kubernetes uses the ETCD database as data store. The flow is like this. Kubectl command connect to API server and sends the yaml file to API server. API parses and store the information in ETCD database. Kube controller and schedule looks at the ETCD database and starts the POD. Controller maintain the number of replica defined in the yaml file.