Kubernetes Apply Step

Updated 1 month ago by Michael Cretzman

This topic describes settings for the Kubernetes Apply step.

The Apply step is used to deploy workloads outside of the primary and sidecar workloads of the deployment.

For example, you might want to deploy an additional resource only after Harness has verified the deployment of the main resources in the Manifests section.

For the topic on using the step, see Deploy Manifests Separately using Apply Step.

In this topic:

Review: What Workloads Can I Deploy?

See What Can I Deploy in Kubernetes?.

Rolling vs Apply

The following table lists the differences between the Rolling Deployment step (default in a Rolling strategy) and the Apply step (which may be used with any strategy).

Jobs

Rollback

Rolling Deployment step

No

Yes

Apply step

Yes

No

Name

The name for the Apply step.

The name is used to reference the step using its Fully Qualified Name (FQN), like <+execution.steps.[step name].name>.

For example, if you name the step Apply, the FQN for the step settings are:

  • <+execution.steps.Apply.name>
  • <+execution.steps.Apply.spec.filePaths>
  • <+execution.steps.Apply.spec.skipDryRun>
  • <+execution.steps.Apply.spec.skipSteadyStateCheck>
  • <+execution.steps.Apply.timeout>

File Path

Enter the path to a manifest file.

File Path has the following requirements:

  • The path to the manifest for the Apply step must be subordinate to the path for the manifest in the Manifests section of the Service Definition. It manifest cannot be in the same folder as Manifests.
  • The path must include the folder name and the file name.

In the following example, the path used in the Manifests section of the Service Definition is default-k8s-manifests/Manifests/Files/templates/. The Apply step uses a Job manifest in the subfolder jobs/job.yaml.

You can enter multiple file paths in File Path. Simply click Add file

Timeout

How long Harness should run this step before failing it. Enter a minimum of 10m to account for network activity in your target environment.

Skip Dry Run

By default, Harness uses the --dry-run flag on the kubectl apply command during the Initialize step of this command, which prints the object that would be sent to the cluster without really sending it.

If the Skip Dry Run option is selected, Harness will not use the --dry-run flag.

Skip Steady State Check

By default, Harness checks to see if a deployed workload has reached steady state.

If you select this option, Harness will not check that the workload has reached steady state.

See Also


Please Provide Feedback