Can't replicate kubectl apply -f functionality with Python client
I have created a deployment using create_namespced_deployment (https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/AppsV1Api.md#create_namespaced_deployment) in python.
But when I tried to update the deployment manually using kubectl apply -f, I am getting warning message like below
Warning: resource deployments/fronend-deployment is missing the
kubectl.kubernetes.io/last-applied-configuration annotation which is
required by kubectl apply.
kubectl apply should only be used on resources created declaratively
by either kubectl create --save-config or kubectl apply.
The missing annotation will be patched automatically
I want to get rid of this warning message.Is there any other way?
I think the create_namespced_deployment method internally using kubectl create -f functionality.Is there any method that uses kubectl apply -f.
Let me know if you have any questions
