diff --git a/lib/kubeclient.rb b/lib/kubeclient.rb index c82420ea..6e49d765 100644 --- a/lib/kubeclient.rb +++ b/lib/kubeclient.rb @@ -497,7 +497,7 @@ def apply_entity(resource_name, resource, field_manager:, force: true) response = handle_exception do faraday_client.patch( "#{ns_prefix}#{resource_name}/#{name}", - resource.to_json, + resource.to_h.to_json, { 'Content-Type' => 'application/apply-patch+yaml' }.merge(@headers) ) end