Execute kubectl scale command via Kubernetes api

I want to execute “kubectl scale deployment --replicas <replica#>” via the kubernetes client java api (https://github.com/fabric8io/kubernetes-client). Is this possible without creating or replacing it with a new deployment? If yes, how?

You can probably use the scale subresource of the Deployment resource. Here is the associated HTTP endpoint: