Part 1 in Why Your Container Isn’t Portable.
Your container image moves easily. The assumptions around it tend to put up a fight.
An application can have a Dockerfile, published images, mature Helm charts, and years of production Kubernetes experience behind it. Moving it to another environment can still become a substantial engineering project.
That can be surprising. We’ve packaged the application. We’ve described its deployment. We can pull the image and create the resources. What’s left?
Everything the application expects the environment to do for it.
Containers are supposed to solve “works on my machine.” They often do. Packaging the application with its userspace dependencies removes a lot of variation between installations.
The trouble starts when we treat that as evidence that the application can operate under a different set of conditions.
The image, the deployment definition, and the environment each supply part of the result. Moving the first two doesn’t establish that the third provides everything the application has been relying on.
The environment has been doing some of the work
An external endpoint contacted during startup. A particular storage behavior. An identity provider the application expects to control. A certificate authority its runtime doesn’t trust.
In the original environment, those expectations are satisfied. They can stay invisible for years because nobody has a reason to describe them separately.
The application works. The deployment pipeline works. New releases keep shipping.
That is useful evidence about the application in that environment. Moving somewhere else introduces questions the existing deployment may never have needed to answer.
Can the application start without reaching a public endpoint? Can it use an identity provider managed by somebody else? Can its processes run with the permissions the target platform allows?
The container didn’t necessarily introduce these dependencies. Packaging the application just didn’t make them disappear.
The image has a platform too
Even before looking at external services, check whether the release supports the target machines.
A Linux image built for amd64 doesn’t become an arm64 image because both environments run Kubernetes. A multi-platform image can provide separate variants for native execution. Check for the required variants across the application and the other images its deployment uses. If the plan relies on emulation, make that explicit and test it too. Docker’s multi-platform build documentation explains those options.
That includes migration jobs, initialization containers, and helper images. The main application image is only part of the release.
This is a useful place to separate requirements from assumptions. Supporting one architecture can be a reasonable product decision. Discovering that requirement after the migration has been scheduled is a planning problem.
Look for portability smells
A portability smell is something worth investigating before making a promise. It isn’t proof that the application is badly designed.
An application built for one cloud may sensibly use that cloud’s services. A workload may have a legitimate reason to need a particular filesystem or additional privileges. Those choices still matter when someone asks it to run elsewhere.
I’d start with questions like these:
| Area | Assumption worth examining | Question before migration |
|---|---|---|
| Networking | A particular ingress controller, DNS name, or network path is always available | Which connections must work, from which processes, and in which direction? |
| Identity | The application can create users, roles, or clients in the identity service | Can it consume an identity service it doesn’t administer? |
| Certificates | Every endpoint uses a certificate the runtime already trusts | How does each client load the target trust configuration? |
| Storage | A volume behaves like the filesystem used in the original deployment | Which access patterns, permissions, and persistence guarantees does the application need? |
| Filesystem | Startup can change ownership or write into the image’s filesystem | Which paths must be writable, and can the application use them with the permitted identity? |
| CPU architecture | All release images support the target nodes | Are compatible variants available for every component and installation job? |
| Outbound connectivity | Startup or first use can download an artifact or contact a public service | What happens during a fresh installation without that access? |
| Cloud services | Credentials and service behavior arrive through the original cloud environment | Can the application use the target service and its credential mechanism? |
| Platform extensions | Required custom resources and controllers already exist | Which cluster capabilities must be installed before the chart can work? |
The answers need to describe behavior. “We use object storage” leaves the operations, credentials, trust configuration, and lifecycle largely unexplained.
Even when an alternate service exposes the API you expect, check the operations your application actually performs. An endpoint setting doesn’t establish that every required behavior or credential mechanism is supported.
Identity has the same problem. A familiar product name can conceal very different ownership and authorization expectations. I’ve explored that in the product name isn’t the integration contract.
Runtime permissions and filesystems deserve their own questions
Consider a hypothetical entrypoint that changes directory ownership, writes a generated configuration into /etc, and then starts the application.
That may work in its current deployment. A target environment that requires a non-root process and a read-only root filesystem asks different questions of it. Kubernetes exposes those controls through the pod and container security context.
Can ownership be prepared when the image is built? Can generated configuration live on a writable volume? Does the application support a different configuration path? Does a mounted volume have the permissions the process needs?
Setting runAsNonRoot doesn’t implement those behaviors. It expresses a constraint the workload must be able to satisfy. A writable volume might resolve one requirement while leaving another untouched.
Likewise, having a PersistentVolumeClaim doesn’t describe everything an application expects from storage. Kubernetes volume access modes describe how volumes can be mounted. You still need to establish whether the application’s file access, ownership, and coordination work on the chosen storage.
Selecting a supported storage class is a configuration decision. Establishing that the application can use the result is the portability work.
A Helm chart can preserve the assumptions too
A mature Helm chart is valuable. It can also be a very thorough description of how to run an application in the environment where it was built.
Values might let you change a hostname while leaving the connection behavior fixed. A chart might deploy an identity service even though the target platform already provides one. An initialization step might download something the application needs before it can start.
Those choices may be reasonable in the original deployment.
The portability question is how much of that environment must come along with them.
If changing an endpoint is supported configuration, that’s straightforward. If the application assumes that endpoint is always reachable during startup, changing the hostname may leave the harder dependency untouched.
The presence of a setting tells you something is configurable. You still need to understand the behavior behind it.
Read beyond the application Deployment. Check installation hooks, migration jobs, subcharts, and the resources the chart expects someone else to create.
A hypothetical chart might let you disable its bundled identity service. That is useful, but it only removes that service from the installation. The application still needs a supported way to consume the identity service you intend to use.
Rendering valid manifests doesn’t exercise those jobs or establish that the application can use the replacement services.
Follow a workflow, not just a resource list
A list of Deployments, Services, Secrets, and PersistentVolumeClaims helps explain what gets installed. It doesn’t necessarily explain what the application needs to accomplish useful work.
Start with a workflow.
For example, imagine a document-processing application. It starts successfully, and its health endpoint responds. A user signs in and uploads a document.
Processing that document might require the application to retrieve a model, write temporary files, publish a queue message, contact a licensing service, and store the result somewhere another replica can read it.
That’s a hypothetical example, but it illustrates the gap. A healthy process and a successful login don’t exercise the whole application.
Walk through what users and operators actually need to do:
- Start the application from a fresh installation.
- Complete a representative user task.
- Run scheduled or background work.
- Restart or replace a component.
- Back up and restore the state needed to continue operating.
- Upgrade to the next version.
Each workflow gives hidden dependencies somewhere to show themselves.
Start with what the application gets for free
A useful portability exercise begins with one question:
What does this application get from its current environment that we haven’t explicitly described?
For each dependency you find, describe the behavior the application expects.
“Needs storage” is a starting point. “Two replicas must read and update the same files, and those files must survive pod replacement” gives the platform team something to evaluate.
“Uses SSO” is a starting point. “Expects these role claims and creates groups through an administration API during installation” describes a much more specific integration.
A small dependency record can keep the conversation concrete:
| Dependency | Expected behavior | When it is needed | If unavailable |
|---|---|---|---|
| Model repository | Supplies a specific model version | First processing job | Job cannot complete |
| Identity provider | Supplies identity and application role information | Login and access checks | User cannot access the application |
| Shared file storage | Makes uploaded files available to processing replicas | Upload and processing | Some replicas cannot process the file |
| External licensing service | Validates the application license | Startup or periodic check | Behavior needs to be established |
The last column is often where the useful questions begin.
Does a failed connection stop startup, fail one request, disable a feature, or get retried forever? Is the dependency required for every workflow or only an optional capability?
Those differences affect what the target environment actually needs to provide.
Airgapped environments expose assumptions quickly
An application might work without internet access after it has been running for a while. That doesn’t establish whether it can be installed and operated without internet access.
The original environment may already have populated caches, downloaded dependencies, or completed an initial registration.
A fresh installation can behave differently.
Check installation, startup, first use, and ongoing operation separately. Include the less frequent activities too: upgrades, recovery, license renewal, and adding a new user or worker.
For each external dependency, determine whether it can be:
- Included in the release artifacts.
- Supplied through an internal service.
- Replaced through supported configuration.
- Disabled without losing a required capability.
- Removed only through an application change.
That gives “airgap support” a concrete meaning for the workflows you need.
It also helps distinguish a packaging task from a product limitation. Copying a required artifact into an internal registry is different work from changing an application that requires a live external service.
Test outside the comfortable environment
Once an expectation is explicit, try it under the target constraints.
Use the intended identity provider. Exercise connections with the target trust configuration. Start the application with the outbound access the new environment will actually allow. Test the storage behavior the workflow relies on.
Use a fresh installation where possible. Otherwise, record what existing state might be helping the test pass.
The constraints need to be enforced for the result to mean much. An application running in a development cluster with unrestricted outbound access hasn’t demonstrated that it can operate with restricted outbound access.
Likewise, manually adding a certificate to a running container may help diagnose a trust problem. You still need a supported, repeatable way to supply that trust on the next deployment.
The useful result is a statement you can substantiate:
From a fresh installation, a user can sign in, upload a document, and retrieve the processed result with outbound access limited to these documented internal services.
That is much more useful than “the pods are healthy.”
Classify the gaps before estimating the work
When a check fails, work out whether the gap is configuration or engineering.
Supplying an internal endpoint through a supported setting is configuration.
Adding support for an internal endpoint when the application hardcodes a public one is application engineering.
Making a required platform capability available through a supported interface may be platform engineering.
Deciding who owns an identity resource, approves access, or operates a backing service requires an agreement between teams.
An endpoint, a Secret, and a certificate can all be configuration inputs. They become useful when existing application behavior knows how to consume them.
Consider a hypothetical certificate failure. The client might already support a configurable CA bundle, in which case supplying it and verifying the connection is configuration. The client might support it while the chart fails to deliver it to the worker, which calls for a packaging change. Or the application might construct a client that cannot use the required trust configuration without a code change.
The symptom can look the same. The work is different.
The same care applies to privileges and internet access. If a supported setting removes the dependency, use it. If the required behavior doesn’t exist, it needs engineering. Adding a chart value named offline won’t make an application stop needing the internet.
Those distinctions matter when someone asks how long onboarding will take.
“Needs a Helm values change” and “needs a new application release” can start with the same symptom. They have different owners, timelines, and maintenance implications.
Keep the acceptance check with the gap. Describe the behavior that needs to work, the constraint it needs to work under, and who owns the change.
That makes progress easier to assess than a growing collection of deployment workarounds.
Portability has a scope
An application doesn’t need to run in every imaginable environment to be useful.
It can require a particular CPU architecture, a supported database, or specific storage capabilities. Requirements are part of software.
The important part is making them visible and testing against the environments you intend to support.
“Portable to these environments under these documented conditions” is a claim a team can maintain. “Runs anywhere Kubernetes runs” leaves a lot for the next deployment to discover.
The target platform may also need to change. Discovering a mismatch doesn’t automatically mean the application is wrong. It means both teams have enough information to evaluate whether to adapt the application, extend the platform, or accept a limitation.
Where the last mile begins
The platform provides capabilities with particular interfaces and constraints. The application arrives with expectations about how those capabilities should behave. Onboarding is where we find out whether they agree.
That’s what I mean by the last mile of platform engineering: the practical work of making the application and the platform agree on something testable and supportable.
The Last Mile series approaches that work from the integration between application and platform teams. This series starts with what the application brings to the move: its requirements, hidden dependencies, and the evidence behind its portability claims.
The value of doing this work extends beyond one deployment. Every assumption you document and every supported configuration path you establish gives the next environment less to rediscover.
Before the next migration estimate, choose one required workflow and identify the least understood environmental dependency along its path. Establish whether the application already supports the target conditions. If the answer is still unknown, put the investigation in the plan.
The next article follows that distinction further: “Just update the Helm values” can hide a lot of engineering.
Containers make environments more reproducible.
Portability is something the application still has to earn.
Continue the conversation on LinkedIn ↗