code: public void scale(final String applicationName, final int replicas) {
          final ReplicationController replicationController = this.client
              .replicationControllers()
              .inNamespace(this.namespace)
              .withName(applicationName)
              .scale(replicas);
          final int availableReplicas = replicationController.getStatus().getAvailableReplicas();
          log.info(String.format("Scaling replicas from %d to %d for application %s.", availableReplicas, replicas, applicationName));
          awaitApplicationReadinessOrFail(applicationName);
      }
docs: Scaling the application to given replicas
  
  @param applicationName name of the application to scale
  @param replicas to scale the application