Advanced Harness Interview Questions (2027)

60 advanced Harness interview questions with answers: expressions, runtime inputs, templates, looping and failure strategies, delegates, OPA, RBAC, CV.

Sep 25, 2025 - 14:03
Nov 10, 2026 - 04:07
 0  170
Advanced Harness Interview Questions (2027)

Advanced Harness interview questions go past "what is a pipeline" and test how the platform behaves under load and governance: expression resolution, runtime inputs, templates and versioning, looping strategies, failure strategies, delegate scaling, Git Experience, OPA policies, RBAC design and Continuous Verification. This page has 60 questions with direct answers, grouped by level, plus scenarios.

Everything here was checked against the Harness Developer Hub in November 2026. If you need the basics of services, environments and deployment strategies first, start with our Harness CD interview questions. For CI, STO, feature management and cost questions, use the Harness engineer guide. This page assumes you know both.

Key takeaways

  • Interviewers at this level care about the pipeline engine: when an expression resolves, why it returns null, and how runtime inputs, templates and looping strategies interact.
  • Expressions are evaluated with JEXL. A step cannot read its own outputs, earlier steps cannot read later ones, and evaluated values are capped at 256 KB.
  • Looping strategies are matrix, repeat and parallelism. maxConcurrency and onFailure work with matrix and repeat, not with parallelism.
  • The delegate makes outbound HTTPS calls only, so the scaling questions are about replicas, selectors, upgrades and network reach, not inbound firewall rules.
  • Governance means OPA (Rego) policy sets evaluated on events such as save and run, RBAC built from roles, resource groups and role bindings, and deployment freezes.
  • Senior answers name the trade-off. "Use templates" is weak; "pin production pipelines to a template version and let lower environments follow stable" is strong.

How this guide fits with our other Harness posts

PostFocusBest for
Harness CD questionsServices, environments, canary, blue-green, GitOps basicsFreshers and CD-focused roles
Harness engineer questionsCI, STO, FME, cost management, resilience testingPlatform engineers covering many modules
This pageEngine internals, templates, governance, delegate scale, verification3+ years of hands-on Harness, platform owners
Harness certification questionsExam levels, domains and sample tasksCandidates sitting a Harness University exam
Scenario-based Harness questionsIncident and troubleshooting walk-throughsFinal-round practice

Harness platform internals (refresher for 2+ years)

1. How is a Harness pipeline structured, and where does each setting live?

A pipeline contains stages, a stage contains an execution section of steps and step groups, and each level can carry variables, failure strategies and conditional execution. Settings live at the narrowest level that needs them: a service and environment belong to a CD stage, a codebase belongs to the pipeline for CI, and a timeout belongs to the step.

The reason interviewers ask this is scoping. A failure strategy defined on a step overrides the stage one for that step, and a variable defined on a stage is visible only to that stage unless you export it as an output.

2. What are organizations and projects, and why do they matter for advanced design?

Harness has three scopes: account, organization and project. Connectors, secrets, templates, delegates and policies can be created at any scope, and lower scopes can reference higher ones. A good design keeps shared things (a Vault connector, a golden pipeline template, OPA policies) at account or org scope and keeps team-specific services and pipelines at project scope.

3. How does Harness evaluate expressions?

Expressions use the <+...> delimiter and are passed to JEXL (Java Expression Language) for evaluation, so you can use operators, method calls and nested expressions. An expression resolves only when the value it points to exists at that moment in the run. If it does not, it resolves to null, which often fails the step.

echo "Run <+pipeline.sequenceId> of <+pipeline.name>"
echo "Deploying <+service.name> to <+env.name>"
echo "Image: <+artifacts.primary.image>"

4. What are the documented limits on expressions?

The Harness docs list several: a step cannot reference its own outputs; earlier steps and stages cannot reference later ones; CD service and environment configuration cannot reference step inputs or outputs; evaluated values are capped at 256 KB; string comparisons support only == and !=; and you cannot write scripts inside an expression. Names with hyphens or spaces need quotes or the get() method.

5. How do you read a secret inside a script without leaking it?

Use <+secrets.getValue("my_secret")>, with an org or account prefix when the secret lives at a higher scope. Harness masks secret values in logs, but masking works on exact matches, so do not transform the value (base64, substrings) and then echo it. The safer pattern is to pass the secret to the tool through an environment variable and never print it.

6. What is a runtime input and when should you use one?

A runtime input is a field set to <+input> so the value is supplied when the pipeline runs or by an input set. Use runtime inputs for values that change per run (an image tag, a target environment) and fixed values or expressions for everything else. Too many runtime inputs make a pipeline hard to trigger automatically.

You can add a default and an allowed list, for example <+input>.default(dev).allowedValues(dev,qa,prod), which turns a free-text field into a controlled choice.

7. What are input sets and overlay input sets?

An input set is a saved group of runtime input values for a pipeline, such as "QA nightly". An overlay input set combines several input sets in order, with later ones overriding earlier ones. Triggers usually reference an input set so the trigger definition stays small and the values are reviewed in one place.

8. What is the difference between a pipeline variable, a stage variable and an output variable?

Pipeline variables are visible across the run as <+pipeline.variables.name>. Stage variables are scoped to one stage as <+stage.variables.name>. Output variables are values a step publishes, such as a Shell Script step's exported variables, which later steps and stages can read through the step's fully qualified path.

9. Why do fully qualified expression paths matter?

Relative paths such as <+execution.steps.build.output...> work inside the same stage, but a step in another stage needs the full path from pipeline.stages. When a stage is generated by a looping strategy, Harness appends an index to the identifier, so you reference deploy_0, not deploy. Forgetting either rule is the most common cause of null expressions in large pipelines.

10. How does conditional execution work?

Every stage and step has a "when" setting with two parts: a pipeline status condition (run on success, on failure, or always) and an optional JEXL condition such as <+pipeline.variables.runTests> == "true". Both must be true for the stage or step to run. Use "always" for cleanup and notification steps.

Advanced pipeline design (3 to 6 years experience)

11. What template types does Harness support?

Harness templates cover steps, step groups, stages and whole pipelines, plus related entities such as secret manager and artifact source templates. A pipeline that uses a template stores a reference and version label, and only the fields the template author left as runtime inputs can be changed by the consuming team.

12. How should you version templates for production?

Give each template a version label and mark one as stable. Lower environments can follow the stable version so changes reach them first, while production pipelines pin a specific version and move forward only after review. This gives you a gradual rollout of pipeline changes, which matters when one template feeds hundreds of pipelines.

13. When would you choose a stage template over a pipeline template?

Choose a stage template when teams build different pipelines but must run the same deployment or security stage. Choose a pipeline template when you want every service to follow the same end-to-end flow, for example build, scan, deploy to QA, approve, deploy to production. Stage templates give teams more freedom; pipeline templates give the platform team more control.

14. What are the three looping strategies?

matrix runs one instance per combination of dimension values, repeat runs a set number of times or once per item in a list, and parallelism runs N identical instances. Matrix and repeat support maxConcurrency, exclude (matrix) and onFailure; parallelism supports neither maxConcurrency nor onFailure.

strategy:
  matrix:
    service: [cart, payments, search]
    env: [qa, staging]
    exclude:
      - service: payments
        env: qa
    maxConcurrency: 2

15. How do you read loop values inside a step?

For a step-level matrix use <+matrix.dimension>; for a stage-level matrix use <+stage.matrix.dimension>. For repeat over a list use <+repeat.item>. <+strategy.iteration> gives the zero-based index and <+strategy.iterations> the total. A mistyped dimension name resolves to null without an error, so test with an echo step first.

16. What limits apply to parallel stages?

The docs give a limit of 256 parallel stages, which can reach 512 for looping-generated stages behind a feature flag. A matrix multiplies its dimensions, so three dimensions of ten values each is 1,000 instances before exclusions. Senior candidates should say they calculate this before adding a dimension and use maxConcurrency to protect shared targets.

17. What failure strategy actions are available?

Harness failure strategies match an error type (for example timeout, verification failure, delegate provisioning, or all errors) to an action: retry, manual intervention, mark as success, mark as failure, ignore, abort, rollback stage, rollback pipeline, or proceed with default values. Retry and manual intervention can have a fallback action when the retry count or wait time runs out.

18. How would you design failure strategies for a production deployment stage?

Retry transient errors such as connector or delegate timeouts a small number of times. Send verification failures straight to rollback stage. Use manual intervention with a timeout and a rollback fallback for anything unknown, so a failed deploy never waits forever. Keep "ignore" off deployment and verification steps, because it hides real failures from DORA metrics.

Error typeSuggested action in productionWhy
Connector or delegate timeoutRetry 2 to 3 times, then rollback stageUsually transient network or capacity issues
Verification failureRollback stageThe release itself is unhealthy; retrying will not help
Approval rejected or timed outAbortNothing was deployed, so there is nothing to roll back
Unknown or all errorsManual intervention with timeout, fallback to rollbackGives an engineer a short window to decide, without blocking forever
Cleanup or notification step failureIgnore (only for these steps)A failed Slack message should not roll back a healthy release

19. What is pipeline chaining?

Pipeline chaining uses a Pipeline stage to run one pipeline from another, passing inputs and reading the child's outputs. It suits organizations where a platform team owns a release pipeline that calls service-owned pipelines. The trade-off is debugging: a failure appears in the child execution, so link executions in notifications.

20. How do barriers and resource constraints differ?

A barrier makes parallel steps or stages wait for each other at a named point, for example so two services switch traffic at the same time. Resource constraints and the Queue step stop two runs from deploying to the same infrastructure at once. Barriers coordinate inside one execution; resource constraints coordinate across executions.

21. What are step groups used for in advanced pipelines?

Step groups bundle steps that share a failure strategy, conditional execution or looping strategy. In CD stages a step group can also run its steps in containers on a Kubernetes cluster, which lets you run tools such as Terraform or a test suite with a pinned image instead of on the delegate host.

22. How do triggers interact with input sets and expressions?

A webhook trigger receives the Git provider payload, which steps can read with expressions such as <+trigger.payload.repository.owner.name>. The trigger can map payload values into runtime inputs or reference an input set. Artifact and manifest triggers start a pipeline when a new tag or chart version appears, and cron triggers run on a schedule.

23. What approval options does Harness provide?

Harness supports its own approval step (named users or user groups, with a minimum count), Jira approvals, ServiceNow approvals and custom approvals driven by a script. Approvals can capture inputs from the approver, and they should always have a timeout so an unattended approval does not hold a deployment slot.

Delegates and connectivity at scale (3 to 6 years experience)

24. How does the delegate communicate with Harness?

The delegate initiates outbound HTTPS connections to Harness on port 443 and polls for tasks. Harness never opens an inbound connection to it. That means you do not open inbound firewall ports; you allow outbound access to Harness and give the delegate network reach to the systems it must deploy to, such as a cluster API server, artifact registry or secret manager.

25. How do you run delegates for high availability?

Run more than one replica of the Kubernetes delegate, size CPU and memory for the expected task load, and spread replicas across nodes or zones. Tasks go to any healthy delegate that matches the selector, so extra replicas add capacity and failover without changing pipelines.

26. What are delegate selectors and tags?

Tags label delegates (for example prod-eks or pci), and selectors on a connector, step or pipeline restrict which delegates can run that work. Use them to keep production credentials on delegates inside the production network and to stop a QA job from landing on a PCI delegate.

27. How are delegates upgraded?

Kubernetes delegates installed with the default manifests or Helm chart include an upgrader that updates the delegate image automatically. Docker delegates are not upgraded automatically. Delegate images also expire, so a delegate that is never upgraded eventually stops working. In regulated environments teams often disable auto-upgrade and upgrade on a schedule after testing.

28. How do you troubleshoot a step stuck on "no eligible delegates"?

Check, in order: whether any delegate with the required selector is connected; whether the connector's selector matches a tag that exists; whether the delegate can reach the target (run a connectivity test from the connector); and whether the delegate is at capacity. The delegate logs show task acquisition and capability check failures.

29. How should secret managers be organized?

Harness has a built-in secret manager and connectors for external ones such as HashiCorp Vault, AWS Secrets Manager, Azure Key Vault and Google Secret Manager. Enterprises usually keep the external connector at account or org scope, set it as default where policy requires, and use delegate selectors so only delegates in the right network fetch production secrets.

30. What is Git Experience and why do platform teams use it?

Git Experience stores pipelines, templates, input sets and other entities as YAML in your Git repository instead of only in Harness. Changes go through pull requests and branch protection, and a run can pick the branch to use. The trade-offs are that a broken YAML commit can break a pipeline and that teams must manage Git connector credentials and webhooks.

31. How do you handle pipeline changes that must be reviewed before use?

Store the pipeline remotely with Git Experience, protect the default branch, require reviews, and run OPA policies on save so a non-compliant change is rejected even if it was edited in the UI. For templates, use version labels so a reviewed change can be rolled out to one team first.

Governance, security and verification (senior)

32. How does Policy as Code work in Harness?

Harness uses Open Policy Agent with policies written in Rego. You group policies into policy sets, attach a set to an entity type and an event (for example a pipeline on save or on run), and choose whether a violation warns or errors. Policies receive the entity as JSON input, so they can check stage types, approval steps, connectors and more.

33. Give an example policy you would enforce on every production pipeline.

Require an approval step before any deployment stage that targets a production environment type. A second common one blocks pipelines that use connectors outside an allowed list. Both run on save, so a non-compliant pipeline is rejected before anyone can run it, and on run as a second check for pipelines stored in Git.

34. How is Harness RBAC built?

RBAC combines principals (users, user groups, service accounts), roles (sets of permissions), and resource groups (sets of resources), joined by role bindings at a scope. Permissions are additive; there is no explicit deny, so least privilege comes from narrow resource groups, not from deny rules.

35. How would you give a team deploy rights to QA but not production?

Create a resource group containing QA environments (or the pre-production environment type) and bind a role with execute permission on pipelines and access to those environments. Production environments go in a separate resource group bound only to the release group. Pair this with an OPA policy and an approval step so a pipeline edit cannot route around the restriction.

36. What are service accounts and API keys used for?

Service accounts are non-human principals for automation such as the Terraform provider, scripts calling the Harness API, or another CI system triggering a pipeline. They get roles like users, and their tokens should be scoped narrowly, stored in a secret manager and rotated on a schedule.

37. What is a deployment freeze?

A deployment freeze is a time window during which deployments matching the freeze scope (organizations, projects, services, environments) are blocked. Admins can define freezes globally or for specific scopes, and users with the override permission can still deploy, which is how hotfixes get through during a release freeze.

38. How does Continuous Verification decide whether a deployment is healthy?

The Verify step pulls metrics and logs from configured health sources (for example Prometheus, Datadog, Splunk or New Relic) for the new version and compares them with a baseline, using machine learning to score anomalies. You choose the verification type, duration and sensitivity. A failed verification can trigger rollback through the failure strategy.

39. How do you avoid false positives in Continuous Verification?

Pick metrics that reflect user experience (error rate, latency percentiles) rather than noisy host metrics, give the analysis enough traffic and duration, and choose sensitivity per service. If a service has very low traffic, use a canary with synthetic load or a longer window rather than letting verification decide on a handful of requests.

40. How do you audit who changed a pipeline and who ran a deployment?

Harness keeps an audit trail of create, update and delete events on entities, and execution history records who triggered each run and who approved it. For entities stored with Git Experience, the Git history adds commit-level review. Many teams stream audit events to a SIEM for long-term retention.

41. How do you manage Harness configuration as code beyond Git Experience?

The Harness Terraform provider and the Harness API create organizations, projects, connectors, secrets, user groups and pipelines. Platform teams use Terraform to bootstrap a new team (project, connectors, role bindings, a pipeline from a template) so every team starts from the same baseline.

42. How would you measure delivery performance in Harness?

Use deployment and execution dashboards for deployment frequency, change failure rate and recovery time, and connect them to the DORA metric definitions so numbers match what leadership reads elsewhere. Make sure "ignore" failure strategies and manual "mark as success" actions are rare, because they distort failure rates.

43. When is Harness not the right tool for a team?

A small team on one cloud with a simple deploy may get enough from GitHub Actions or GitLab CI and a GitOps controller. Harness pays off when you need governance across many teams: templates, OPA, RBAC, approvals, verification and audit in one place. A good senior answer weighs licence cost and platform ownership against those needs.

44. How does Harness GitOps differ from a pipeline-driven Kubernetes deployment?

Harness GitOps is built on Argo CD: an agent in the cluster reconciles applications from Git, and Harness adds a management plane for agents, applications and sync. A pipeline-driven deployment pushes changes through Harness steps. Many teams use pipelines to update the Git repository and let GitOps apply it, which keeps Git as the source of truth.

45. How do you keep pipeline execution fast as usage grows?

Run independent stages in parallel, cap matrix concurrency against shared targets, cache in CI stages, keep delegate capacity ahead of peak load, and remove waits such as long approvals from automated paths. Watch queue time separately from execution time; long queues usually point to delegate or build infrastructure capacity, not slow steps.

Scenario-based advanced Harness questions

46. An expression works in one stage but returns null in the next. What do you check?

Check the path first: a relative path that works inside a stage needs the full pipeline.stages.<id>... path from another stage. If the source stage came from a looping strategy, add the index suffix. Then confirm the source step actually ran, because a skipped step produces no outputs, and check the expression in the execution's input and output tab.

47. A template change broke 40 pipelines overnight. How do you recover and prevent it?

Point affected pipelines back at the previous version label, or move the stable marker back, to restore service. Then change the process: production pipelines pin explicit versions, changes go to a new version label tested by one team, and the stable label moves only after review. Add a policy that blocks pipelines using an unversioned template reference in production.

48. Deployments queue for 20 minutes before any step starts. Where do you look?

Look at delegate capacity and connectivity first: are replicas connected, are they at their task limit, and do selectors leave only one eligible delegate? Then check resource constraints and Queue steps, which deliberately serialize runs against the same infrastructure. Finally check whether a freeze window or pending approval in a parent pipeline is holding the run.

49. A matrix deployment to 30 clusters overloaded the shared artifact registry. What changes?

Add maxConcurrency to the matrix so only a few clusters pull at once, and consider a registry cache or mirror close to the clusters. Set onFailure deliberately: abort stops remaining iterations, while ignore continues the other clusters. For production, waves (a small first group, then the rest) are safer than one large matrix.

50. Security finds a production secret printed in a build log. What do you do?

Rotate the secret first, then find the cause. Masking hides exact matches, so the usual cause is a transformed value or a tool printing its own configuration. Fix the script to pass the secret by environment variable, restrict log access, and add a policy or review check against scripts that echo variables named like credentials.

51. Teams keep bypassing approvals by editing pipelines. How do you stop it?

Move approval into a stage template the teams cannot edit, add an OPA policy on save and on run that rejects production pipelines without that stage, and remove pipeline edit rights from developers in production projects through resource groups. Pair it with Git Experience so pipeline changes need a reviewed pull request.

52. Continuous Verification keeps passing bad releases. How do you investigate?

Check that the health source queries actually include the new version's pods or hosts (service instance identifiers are a common mistake), that the window has enough traffic, and that the chosen metrics reflect the failure users saw. If the regression showed up in latency percentiles but you only verify error count, add the latency metric.

53. A delegate upgrade broke a deployment to an older on-premises cluster. What is your response?

Roll the delegate image back to the last working version if your install allows it, or route the affected connector to a delegate group you have not upgraded yet. Then test upgrades in a non-production delegate group first, and pin upgrades for that segment until the incompatibility is fixed, keeping an eye on image expiry so you do not fall too far behind.

54. You need the same release pipeline for 200 microservices. How do you design it?

Build one pipeline template with service, artifact tag and environment as runtime inputs, generate per-service pipelines from it with the Terraform provider, and drive them with artifact triggers. Keep governance in the template and in OPA. For cross-service releases, use a parent pipeline with Pipeline stages and barriers where services must switch together.

55. A webhook trigger fires twice for every push. How do you fix it?

Check for duplicate webhooks on the repository (one created by Harness, one added by hand) and for two triggers with overlapping conditions, such as one on push and one on pull request update for the same branch. Tighten trigger conditions on branch, event and changed file paths so one event maps to one trigger.

56. An auditor asks you to prove every production deployment last quarter had an approval. What do you provide?

Export execution history filtered to production environments, with approval step details showing approver and time, plus the audit trail for any pipeline changes and freeze overrides. Show the OPA policy that requires approvals and its evaluation history. That combination shows both the control and the evidence that it ran.

57. A team wants to skip verification to ship faster. How do you respond?

Ask what the verification costs them in time and why. Often the fix is a shorter window with better metrics or verifying canary traffic in parallel with other steps. If the service is low risk, a policy can allow a lighter verification profile for that environment type instead of removing it entirely.

58. Rollback succeeded, but the database migration from the release did not roll back. What should change?

Harness rolls back what its steps deployed; it cannot undo a schema change it did not manage. Make migrations backward compatible (expand, then contract), run them as a separate stage with its own rollback logic, or manage them with Harness Database DevOps so schema changes have their own tracked rollback path.

59. Pipelines stored in Git fail with "entity not found" on a feature branch. Why?

The pipeline YAML on that branch may reference a template version, input set or connector that exists only on the default branch, or the file path differs. Check which branch the run used, make sure referenced entities exist on it, and keep shared templates on a fixed branch that pipelines reference explicitly.

60. How would you migrate a Jenkins estate to Harness without a freeze on releases?

Start with deployment: keep Jenkins builds and have Harness deploy the artifacts they produce, so release governance improves first. Move one service family at a time to Harness CI using templates, run both paths in parallel until results match, and retire Jenkins jobs once the Harness pipeline has run cleanly for a set period. Track migration with deployment metrics so you can show nothing regressed.

How to prepare for an advanced Harness interview

  1. Build a pipeline with a stage-level matrix and read loop values in a later stage using full paths. Break it on purpose and fix the null expressions.
  2. Write one stage template with two version labels and switch a pipeline between them.
  3. Write and test a Rego policy in the Harness policy editor that requires an approval before production.
  4. Install a Kubernetes delegate with two replicas and a tag, and route one connector to it with a selector.
  5. Configure a Verify step against Prometheus and watch it fail a deliberately bad release.

Harness sits on top of Kubernetes, Git and cloud fundamentals, so interviewers will probe those too. Our DevOps training in Pune (classroom in Kharadi and live online) covers the pipeline, container and cloud skills behind these questions, and the 200+ DevOps interview questions guide covers the general rounds.

Official references

FAQs

What is asked in an advanced Harness interview?

Expect questions on expression resolution, runtime inputs and input sets, templates and versioning, looping and failure strategies, delegate scaling and selectors, Git Experience, OPA policies, RBAC, deployment freezes and Continuous Verification, followed by troubleshooting scenarios.

How many years of experience does this guide assume?

Roughly three or more years of hands-on CI/CD, with at least a year running Harness pipelines. Freshers should start with our Harness CD interview questions and come back to this page later.

Why does a Harness expression resolve to null?

Usually the target value does not exist yet at that point in the run, the path is relative when it needs to be fully qualified, a looping stage needs its index suffix, or the source step was skipped. Check the execution's inputs and outputs to see the real path.

Which looping strategy should I use?

Use matrix for combinations such as service by environment, repeat for a fixed count or a list of items such as cluster names, and parallelism for identical workers such as test shards. Only matrix and repeat support maxConcurrency and onFailure.

Does the Harness delegate need inbound firewall ports?

No. The delegate makes outbound HTTPS connections to Harness on port 443. It needs outbound network access to the systems it deploys to and fetches secrets from.

How do OPA policies work in Harness?

You write policies in Rego, group them into policy sets, and attach each set to an entity type and event such as pipeline on save or on run. A violation can warn or block the action.

Is this guide enough for a Harness certification?

It helps with the Administrator and Architect topics, but the exams follow published domains and include hands-on tasks. Use our Harness certification interview questions page and the Harness University study guides alongside this one.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.