Skip to content

Containers and Kubernetes

Advanced 20 minutes

Overview

RosettaHub provides a unified interface for managing containers, container images, registries, and Kubernetes clusters across cloud providers. In this tutorial you will manage container lifecycles, set up repositories, and work with Kubernetes clusters from the CLI.

Prerequisites

  • [ ] Completed Getting Started with the CLI
  • [ ] At least one cloud account with container service access
  • [ ] Default cloud and region configured

Steps

Step 1: Manage Containers

List, start, stop, and manage containers:

rh container create --label "API Server"
rh container start <containerUid>
rh container stop <containerUid>
rh container reboot <containerUid>
rh container recreate <containerUid>
rh container delete <containerUid>

Check container state:

rh container state <containerUid>

Commit a container (save its current state as an image):

rh container commit <containerUid>

Step 2: Container Images

List and manage container images:

rh container-image ls
rh container-image ls -s    # shared images
rh container-image ls -p    # public images

Create a container image:

rh container-image create --label "ML Training Image"

Step 3: Container Repositories

Container repositories host your container images (ECR, ACR, GCR):

rh container-repository ls
rh container-repository create --label "Team Registry"

Step 4: Kubernetes Clusters

Create and manage Kubernetes clusters:

rh k8s ls
rh k8s create --label "Dev Cluster"
rh k8s get <clusterUid>
rh k8s delete <clusterUid>

Check available Kubernetes versions:

rh k8s versions

Step 5: Kubernetes Node Groups and Autoscaling

Manage node groups:

rh k8s node-groups <clusterUid>
rh k8s delete-node-groups <clusterUid>

Create an autoscaler:

rh k8s create-autoscaler <clusterUid>

Create a dashboard:

rh k8s create-dashboard <clusterUid>

Step 6: Share Kubernetes Clusters

rh k8s share <clusterUid>
rh k8s unshare <clusterUid>

Step 7: Engine Pools

Engine pools define worker node configurations for clusters:

rh engine-pool ls
rh engine-pool create --label "GPU Workers"

Step 8: Inspect Resources with JSON Output

Use JSON output for detailed inspection:

rh k8s ls -O json
rh container-image ls -O json
rh engine-pool ls -O json

Tip

Use --dry-run when creating clusters to preview the configuration before provisioning.


Next Steps

Troubleshooting

Cannot create Kubernetes cluster

Ensure your cloud account has the required permissions for container services (EKS, AKS, GKE).

Container image not found

Cloud-native images must be registered in RosettaHub first. Use rh container-image create.

What Kubernetes versions are available?

Run rh k8s versions to see all supported versions for your cloud provider.