def METHOD_NAME(benchmark_spec):
  """Prepares a cluster to run the Nginx benchmark."""
  with _CreateNginxConfigMapDir() as nginx_config_map_dirname:
    benchmark_spec.container_cluster.CreateConfigMap(
        'default-config', nginx_config_map_dirname)
  container_image = benchmark_spec.container_specs['kubernetes_nginx'].image
  replicas = benchmark_spec.container_cluster.nodepools['nginx'].num_nodes
  nginx_port = 80
  if FLAGS.nginx_use_ssl:
    nginx_port = 443
  benchmark_spec.container_cluster.ApplyManifest(
      'container/kubernetes_nginx/kubernetes_nginx.yaml.j2',
      nginx_image=container_image,
      nginx_replicas=replicas,
      nginx_content_size=FLAGS.nginx_content_size,
      nginx_port=nginx_port,
      nginx_worker_connections=FLAGS.nginx_worker_connections,
      runtime_class_name=FLAGS.kubernetes_nginx_runtime_class_name)
  benchmark_spec.container_cluster.WaitForResource(
      'deploy/nginx-deployment', 'available')