<p>I know about several ways to perform rolling update of deployment. But do either <code>kubectl apply -f deployment.yaml</code> or <code>kubectl apply -k ...</code> update deployment according to the rolling update policy of a new version of deployment or an old one?</p>

Russiancold
<p>Yes it will, with one note :</p>
<blockquote>
<p>Note: A Deployment's rollout is triggered if and only if the
Deployment's Pod template (that is, .spec.template) is changed, for
example if the labels or container images of the template are updated.
Other updates, such as scaling the Deployment, do not trigger a
rollout.</p>
</blockquote>
<p>Reference : <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment</a></p>
<p>For example, you can see the events section of a deployment update after updating the nginx image and running <code>kubectl apply -f nginx-deploy.yml</code> :</p>
<pre><code>...
NewReplicaSet:   nginx-deployment-559d658b74 (3/3 replicas created)
Events:
  Type    Reason             Age   From                   Message
  ----    ------             ----  ----                   -------
  Normal  ScalingReplicaSet  112s  deployment-controller  Scaled up replica set nginx-deployment-66b6c48dd5 to 3
  Normal  ScalingReplicaSet  44s   deployment-controller  Scaled up replica set nginx-deployment-559d658b74 to 1
  Normal  ScalingReplicaSet  20s   deployment-controller  Scaled down replica set nginx-deployment-66b6c48dd5 to 2
  Normal  ScalingReplicaSet  20s   deployment-controller  Scaled up replica set nginx-deployment-559d658b74 to 2
  Normal  ScalingReplicaSet  19s   deployment-controller  Scaled down replica set nginx-deployment-66b6c48dd5 to 1
  Normal  ScalingReplicaSet  19s   deployment-controller  Scaled up replica set nginx-deployment-559d658b74 to 3
  Normal  ScalingReplicaSet  18s   deployment-controller  Scaled down replica set nginx-deployment-66b6c48dd5 to 0
$ kubectl get deploy
NAME               READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deployment   3/3     3            3           114s
</code></pre>
