Deploy an Application
Deploy a container to Cloud Run, Kubernetes or Compute Engine. Use an Application when the platform builds the image. Use an ExternalApplication when the image already exists in a registry.
Prerequisites
- The
ReleaseTrack,ApplicationSetandDeploymentConfigmanifests from Get Started. - For an
Application: aBuildDefinition. See Set Up a Repository and CI. - For an
ExternalApplication: anExternalRegistryand aTrustedRepositorymanifest for the registry, and the name of the image.
Steps
-
Create the application manifest. Pick one.
An
ExternalApplicationnames a trusted repository and an image:apiVersion: lowops.manifests.v1
kind: ExternalApplication
metadata:
name: my-new-app
application-set: my-app-set
release-track: my-product-releasetrack
organizational-unit: your-ou
organization: your-org
spec:
trustedRepository: my-trusted-repo # a TrustedRepository manifest
image: my-image # the image in that repository
project: your-project
target: CLOUD_RUN # or KUBERNETES, or COMPUTEAn
Applicationnames theBuildDefinitionthat builds the image:apiVersion: lowops.manifests.v1
kind: Application
metadata:
name: my-new-app
application-set: my-app-set
release-track: my-product-releasetrack
organizational-unit: your-ou
organization: your-org
spec:
buildDefinition: my-app-build-definition
project: your-project
target: CLOUD_RUNIf
targetisKUBERNETES, setspec.clusterto the name of aKubernetesmanifest. Support for Google Kubernetes Engine (GKE) is in active development and not yet generally available. -
Set
metadata.nameof theDeploymentConfigto the name of the application. -
Commit all new manifests in one pull request. The plan lists the Google Cloud resources that the merge creates.
-
Merge the pull request.
Verify
The run for your merge shows the application as created. The platform deploys it to the first environment with the settings of the DeploymentConfig.
Next
- Change
spec.targetto move the app to another compute service. See Architectural Overview and Migrate a Service to Cloud Run. ExternalApplicationreference