def scale_up(self, n, pods=None, **kwargs):
maximum = dask.config.get('<STR_LIT>')<EOL>if maximum is not None and maximum < n:<EOL><INDENT>logger.info("<STR_LIT>",<EOL>n, maximum)<EOL>n = maximum<EOL><DEDENT>pods = pods or self._cleanup_terminated_pods(self.pods())<EOL>to_create = n - len(pods)<EOL>new_pods = []<EOL>for i in range(<NUM_LIT:3>):<EOL><INDENT>try:<EOL><INDENT>for _ in range(to_create):<EOL><INDENT>new_pods.append(self.core_api.create_namespaced_pod(<EOL>self.namespace, self.pod_template))<EOL>to_create -= <NUM_LIT:1><EOL><DEDENT>break<EOL><DEDENT>except kubernetes.client.rest.ApiException as e:<EOL><INDENT>if e.status == <NUM_LIT> and '<STR_LIT>' in e.body:<EOL><INDENT>logger.info("<STR_LIT>", i + <NUM_LIT:1>)<EOL>time.sleep(<NUM_LIT:1>)<EOL>last_exception = e<EOL>continue<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raise last_exception<EOL><DEDENT>return new_pods<EOL>
Make sure we have n dask-workers available for this cluster

Examples
--------
>>> cluster.scale_up(20)  # ask for twenty workers