Skip to main content

Container image

Run a container image as a web service. You give the image and its port; AstroPulse writes the Kubernetes setup, places and scales it by its availability tier, and can serve it on your domain.

Before you start​

  • A cluster with an application profile. The wizard picks or creates one for you.
  • An image the cluster's nodes can pull. Public images need nothing. For a private registry, give the nodes read access to it first: The node pulls the image. The image source takes no registry credentials. Every way to give a cluster access, by where it runs: Registry access.
  • An image that listens on a port of 1024 or above, and runs without extra Linux capabilities (see What the container runs with).

In the console​

  1. Open Workloads > Applications > Deploy application. Enter the Application name and pick the Target Cluster.

  2. On Profile, keep the profile picked for the cluster, or select Create New.

  3. On Source, select Container image. Enter the image repository, for example astropulse/latency, and its tag, for example v1.0.0. Use a fixed tag, never latest, so every deploy runs the same image.

  4. Enter Container Port if the image does not listen on 8080.

  5. Select Validate. "Image and tag found." means the cluster can pull it.

    Open zoom view

    The Source step with Container image astropulse/latency:v1.0.0 on port 8080

    The Source step with Container image astropulse/latency:v1.0.0 on port 8080The Source step with Container image astropulse/latency:v1.0.0 on port 8080
  6. On Access, keep Internal only, or pick a verified domain to serve it publicly. See Custom domain.

  7. Select Review, run the dry run, then Deploy.

You should see​

The application's page shows Running, its endpoint when it is served on a domain, and its running configuration.

An application's Overview with its running configurationAn application's Overview with its running configuration

If it does not start, its Events and Logs tabs say why: Troubleshoot.

Update to a new version​

Open the application's Update tab, select Change configuration, and change the tag. AstroPulse replaces the pods one at a time, so the application keeps serving. Every deploy is a version you can roll back to.

What the container runs with​

The container runs with every Linux capability dropped, without privilege escalation, and under the RuntimeDefault seccomp profile. An image that needs a capability, such as binding a port below 1024, fails when it uses it, usually as it starts. For nginx, use nginxinc/nginx-unprivileged, which listens on 8080.

Other ways in​

  • Nova: ask it, for example "deploy hello-world from astropulse/latency:v1.0.0".
  • SDK and API: the same manifest: Deploy an application.

With astroctl​

application.yaml
apiVersion: platform.astropulse.io/v1
kind: Application
spec:
name: hello-world
profileName: default-profile
source:
type: Image
image:
repository: astropulse/latency
tag: v1.0.0

astropulse/latency listens on 8080, the default, so the manifest sets no port.

Terminal
astroctl app apply -f application.yaml --dry-run
astroctl app apply -f application.yaml

The dry run checks the manifest against the profile and the cluster. It doesn't check that the image exists: a tag Docker Hub doesn't have passes it, and the deploy then can't pull it. The console's Validate checks the image first.

See the astroctl reference.

Settings​

The settings every source shares (name, profile, namespace, sync) are on Sources. These are specific to an image:

Container Imagesource.image.repositoryRequired

The image's repository, such as astropulse/latency or ghcr.io/acme/web.

Tagsource.image.tagRequired

The image tag. Use a fixed tag, not latest.

source.image.registry

The registry host, when it is not part of the repository.

Default
docker.io
Container Portsource.image.port

The port the container listens on. Traffic goes to this port, so it must match what the container serves, or the application deploys and answers nothing. AstroPulse doesn't check that the port answers yet: with the wrong port, the application still reads Running and healthy. Check it by calling the application once it runs.

Accepts
1024 or above
Default
8080
Access stepexternalAccess

How the application is reached from outside the cluster: accessType Ingress or LoadBalancer, and a domain or hostname with an optional tls.mode (Certificate, Wildcard or Passthrough). Leave it out to keep the application internal. accessType cannot change after the first deploy: an update from Ingress to None or LoadBalancer is refused with "accessType is immutable once set".

Next​