Skip to main content
Create a Managed Kubernetes cluster for Data Science
Last update:

Create a Managed Kubernetes cluster for Data Science

In a Managed Kubernetes cluster, you can run a container with pre-installed machine learning tools and run the Jupyter Notebook service in it.

Container can be used to train and infer models for application development and data manipulation.

List of tools

A list of packages in the container:

Create a cluster for Data Science

  1. In Control Panel, go to Cloud PlatformKubernetes.
  2. Click Create Cluster.
  3. Select a node group configuration with parameters of at least 4 vCPUs, 8 GB RAM, 20 GB SSD.
  4. Select the rest of the cluster settings (more details in the Create Managed Kubernetes cluster instructions) and click Create.
  5. Connect to cluster.

Start the container

  1. Download YAML file with deployment configuration.

  2. Start the container:

    kubectl apply -f selectel-ml.yaml
  3. Check the status of the container:

    kubectl get pod -w
  4. Wait for the Running status — it means that the container is created and running:

    selectel-ml 1/1 Running

Launch Jupyter Notebook

  1. Open a port to access the service:

    kubectl expose deployment selectel-ml --type=LoadBalancer --name=my-service
  2. Get the port to connect to the Jupyter server:

    kubectl get services

    Example answer:

    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    my-service LoadBalancer 10.100.90.86 203.0.113.1 8888:31779/TCP 30s
  3. In the address bar of your browser, enter the address from EXTERNAL-IP and the port number from PORT(S), for example 203.0.113.1:8888.

  4. If <pending> is displayed in EXTERNAL-IP, run the kubectl get services command after a few minutes.

  5. In the Jupyter Notebook web interface that opens, enter the default password: 9lG0eXCevt.

  6. Optional: Change the password according to Jupyter Notebook instructions.

Working with the container through the console

Configure the container operation through the console:

kubectl exec -it [pod name] /bin/bash