Kubernetes Deployment in declarative way - another example

Just replace kind in ReplicaSet example from ReplicaSet to Deployment and you are good to go.

The Deployment will create the ReplicaSet and following: the ReplicaSet will create the Pods with the name of the Deployment