Scenario-Based Harness Interview Questions (2027)

40 scenario-based Harness interview questions on pipeline design: canary vs blue-green, templates, OPA policies, delegates, GitOps and governance.

Sep 25, 2025 - 14:49
Nov 10, 2026 - 15:15
 0  85
Scenario-Based Harness Interview Questions (2027)

Scenario-based Harness interview questions give you a delivery problem and ask you to design the answer: how to roll out a risky service, how to give fifty teams the same pipeline, how to keep production approvals auditable, or how to move from scripts to GitOps. You are judged on the Harness features you choose and why. This page has 40 design scenarios with direct answers, grouped by experience level.

Harness behaviour described here was checked against developer.harness.io in November 2026. This page covers design and planning scenarios. If you want live troubleshooting (a failed run, an offline delegate, a null expression), read the real-time Harness interview questions. For deep feature questions see the main advanced Harness interview questions page.

Key takeaways

  • Scenario questions test choices. Say which Harness feature you would use, what you would configure, and what risk it removes.
  • Most design answers reuse a small set of building blocks: services, environments, infrastructure definitions, templates, input sets, failure strategies, approvals, policies (OPA), Continuous Verification and deployment freezes.
  • The delegate runs inside your network and opens outbound HTTPS connections to Harness, so network design questions usually come down to where delegates sit and which selectors route work to them.
  • Freshers get single-service scenarios. Engineers with 2 to 5 years get multi-environment and multi-team scenarios. Senior candidates get governance, scale and migration scenarios.
  • Always finish with how you would know the design works: a metric, an audit trail, or a test run in a lower environment.

How to answer a Harness design scenario

Use the same four steps for every question. Interviewers notice when a candidate jumps straight to a feature name without stating the requirement.

StepWhat you sayExample
1. Restate the goalOne sentence on what must be true at the end"Production deploys must be reversible within minutes."
2. Pick the building blocksHarness entities and settingsCanary step, Verify step, failure strategy with rollback
3. Name the trade-offWhat it costs or what can go wrongCanary needs good metrics or verification is noise
4. Prove itHow you would test or measure itRun a deliberate bad build in staging and watch rollback

Scenarios for freshers

1. You must deploy one containerised web service to a Kubernetes dev cluster with Harness. What do you create?

Create a service (the manifests and the artifact source), an environment (dev), an infrastructure definition (the cluster and namespace, reached through a Kubernetes connector), and a pipeline with a Deploy stage that uses a rolling deployment. Install a delegate that can reach the cluster, or use one already registered for it. That is the smallest working setup and it maps directly to how Harness models a deployment.

2. The image registry needs credentials. Where do they go?

Store the password or token as a secret in a secret manager connected to Harness (the built-in one, or HashiCorp Vault, AWS Secrets Manager and similar). Reference it from the Docker registry connector. Never paste credentials into a pipeline variable or a manifest. Secrets referenced through the secret manager are masked in logs.

3. Developers want each deploy to ask for the image tag. How do you set that up?

Make the artifact tag a runtime input (<+input>) in the service's artifact source. When someone runs the pipeline, Harness prompts for the value. You can add allowed values or a default so people do not type invalid tags.

4. Your team wants the pipeline to start automatically when a new image is pushed. Which feature do you use?

Use an artifact trigger on the registry. When a new tag matches the trigger condition, Harness starts the pipeline and passes the tag. For code changes you would use a webhook trigger on the Git repository instead. Keep the trigger in the same project as the pipeline so permissions stay simple.

5. The QA lead wants to approve before anything reaches the QA environment. How?

Add a Harness Approval step at the start of the QA stage and set the approvers to a user group that contains the QA leads. Set a timeout so a forgotten approval does not keep the run open for days. If the team already tracks releases in Jira or ServiceNow, use those approval steps so the decision is recorded where they work.

6. You have dev, QA and prod. Should that be three pipelines or one?

Usually one pipeline with three stages, each pointing at a different environment, so the same build moves through all of them. Separate pipelines make it easy to deploy something to prod that never went through QA. If prod needs stricter controls, add an approval and a policy check to that stage rather than splitting the pipeline.

7. A teammate asks why the deploy needs a delegate at all. What do you explain?

The delegate is a small service you run inside your own network. It performs the work (calling the Kubernetes API, pulling manifests, running scripts) and talks to Harness over outbound HTTPS. Harness itself never needs inbound access to your cluster. That is why you can deploy to private clusters without opening firewall ports.

8. The same values differ per environment (replica count, URL). How do you handle them?

Put environment-specific values in environment overrides or in per-environment values files, and reference them from the manifests. The service definition stays the same everywhere. This keeps the difference between dev and prod visible in one place instead of spread across copies of the pipeline.

9. Your manager asks how you would know which version is in production right now. What do you show?

Show the service dashboard or the environment view, which lists the artifact version deployed to each environment and the pipeline execution that put it there. Each execution keeps its inputs and logs, so you can trace a running version back to the run, the person or trigger that started it, and the approvals.

10. A deployment fails halfway. What should happen by default, and how do you make sure it does?

The stage should roll back to the last good version. Set a failure strategy on the deploy stage with the rollback action for all errors, and make sure the stage has rollback steps (Harness adds a rollback step for standard Kubernetes strategies). Test it once in dev with a broken image so you have seen it work.

11. A step needs a script that runs a database migration before deploy. Where does it go and what are the risks?

Add a Shell Script step before the deploy step, executed on a delegate that can reach the database. The risk is that a migration is not undone by a Kubernetes rollback. Make migrations backward compatible (add columns before using them, remove later) so the previous app version still works if the deploy rolls back.

12. How would you keep pipeline YAML under review like application code?

Store the pipeline in Git using Harness Git Experience. Changes go through branches and pull requests, and Harness reads the pipeline from the repository. Reviewers see a YAML diff, and you get the same history and blame you have for code.

Scenarios for 2 to 5 years of experience

13. Twenty microservices need the same build-and-deploy flow. How do you avoid twenty copies?

Build a stage template (or a pipeline template) for the common flow and version it. Each service pipeline references the template and supplies only its own service and inputs. When the flow changes, you publish a new template version and teams move to it on their own schedule, or you update a stable version label they all follow.

14. Teams keep asking for small template changes. How do you stop the template from becoming unmaintainable?

Expose the differences as runtime inputs or variables with sensible defaults instead of adding branches for each team. Keep the template small and push team-specific extra steps into step groups or a separate stage they own. Version templates so a change for one team cannot break everyone else's runs without warning.

15. A payment service must deploy with minimal blast radius. Which strategy do you pick?

A canary deployment. Deploy a small canary first, run a Verify step that compares its metrics and logs with the stable version, then roll out fully or roll back. Canary suits a service with steady traffic and good metrics. If traffic is too low to compare, verification results are weak, and blue-green with smoke tests may be more honest.

16. When would you choose blue-green over canary?

Choose blue-green when you need an instant switch and an instant switch back, for example when two versions cannot safely serve traffic at the same time. Harness deploys the new version next to the old one, you test it on the stage service, then swap traffic. The cost is running two full copies during the deploy.

17. Product wants to release a feature to 5% of users without a new deploy. What do you suggest?

Use feature flags. The code ships dark, and the flag controls who sees the feature, with percentage rollouts and targeting rules. Harness has its own feature flag module, and teams can also use another flag tool. This separates deploying code from releasing a feature, which a canary cannot do. See our guide to feature flag tools for rollouts for options.

18. The ops team runs two clusters in different regions. How do you deploy to both?

Create one environment with two infrastructure definitions, or two environments in an environment group, and deploy to them in sequence or in parallel. Sequential deploys let you stop if region one fails verification. Parallel deploys are faster but double the blast radius. Most teams deploy to one region, verify, then the second.

19. The prod cluster sits in a separate network from dev. How do you place delegates?

Run a delegate inside each network that can reach its own cluster. Tag them (for example prod and nonprod) and use delegate selectors on the connectors so prod work only runs on the prod delegate. Run at least two delegate replicas per network for availability.

20. Security asks that no pipeline can deploy to prod without an approval. How do you enforce it across all teams?

Write an OPA policy in Harness Policy as Code that checks pipelines on save and on run, and fails if a stage targeting a production environment has no approval step. Attach it through a policy set at the account or organization level so teams cannot skip it. A template alone is not enough, because a team can build a pipeline without the template.

21. Some deploys need to stop during a festival sale period. What do you configure?

A deployment freeze window for the affected environments and services, with start and end times. Harness blocks deploys during the window. Decide in advance who can override it for emergency fixes, and keep that list short. Announce the window in the team channel so nobody is surprised by a blocked run.

22. Builds are slow because every run downloads dependencies again. What do you change?

In Harness CI, use caching (cache intelligence or explicit save and restore cache steps) for dependency directories, and reuse Docker layers where the build allows it. Test selection features can also skip tests unrelated to the change. Measure build time before and after so you know the change helped.

23. The team wants to scan images and code before deploy. Where does the scan go?

Add security scan steps in the CI stage, after the image is built and before it is pushed or promoted. Harness Security Testing Orchestration can run and normalise many scanners. Fail the pipeline on new critical findings, not on every historic issue, or teams will start ignoring the gate. Our post on DevSecOps tools for secure CI/CD covers scanner choices.

24. A pipeline must call an internal API to register each release. How do you do it safely?

Use an HTTP step (or a Shell Script step on a delegate that can reach the API). Read the API token with a secret expression such as <+secrets.getValue("release_api_token")> so it stays masked. Set a timeout and a failure strategy that decides whether a failed registration should block the deploy or just warn.

25. Different teams should only deploy their own services. How do you set permissions?

Give each team its own project and grant its user group a role scoped to that project's resources. Shared connectors and templates live at organization level with view access. Avoid giving deploy rights at account level except to platform admins.

26. You need to pass a value computed in a build stage to the deploy stage. How?

Export it as an output variable from the step (for a shell step, list it in output variables) and reference it in the later stage with its full expression path. Using the full path avoids errors when stages or steps are renamed or moved. Document the variable in the template so other teams know it exists.

Scenarios for senior and lead roles

27. You are asked to roll Harness out to 300 developers across 40 teams. What does the structure look like?

One account, an organization per business unit, and a project per team or product. Put shared connectors, secret managers, templates and policies at organization level. Define a small set of golden templates, enforce mandatory checks with OPA policies, and give teams freedom inside their projects. Start with two or three pilot teams, fix the templates, then onboard in waves.

28. Leadership asks whether Harness is helping. What do you measure?

Track deployment frequency, lead time for changes, change failure rate and time to restore service (the DORA metrics), plus pipeline duration and how often rollback runs. Compare teams before and after onboarding. Harness has dashboards for deployment data, and the DevOps performance metrics tools guide covers other options.

29. An audit asks you to prove who approved and ran every prod deploy last quarter. How is that designed in?

Approvals by named user groups, deploys through pipelines only (no direct kubectl access to prod), pipelines stored in Git, and the Harness audit trail enabled and exported to your log store if retention needs exceed the platform default. With that in place the audit answer is a report, not an investigation.

30. A team wants to move from pipeline-driven deploys to GitOps. How would you plan it?

Use Harness GitOps, which manages Argo CD based agents, so the desired state lives in Git and the agent syncs it to the cluster. Keep the pipeline for building, testing and opening the pull request that changes the manifest. Migrate one low-risk service first and compare drift handling and rollback. Our advanced Harness questions compare the two models in detail.

31. The delegate fleet is now a single point of failure for every deploy. How do you design it?

Run several delegate replicas per network segment, spread across nodes or zones, with resource limits sized from real usage. Keep auto-upgrade on (or a tested upgrade routine), monitor delegate health, and alert when the count of connected delegates for a selector drops. Separate delegates for heavy CI work from those that run production deploys.

32. Teams are writing the same OPA policies with small differences. What do you do?

Own a central policy library at account or organization level, versioned in Git, with tests for each policy. Teams can add stricter local policies but cannot remove the central ones. Start new policies in warn mode, look at what would have failed, then switch to error mode.

33. You must support deployments to Kubernetes, AWS Lambda and some VMs. Does one design still work?

Yes. Harness supports different deployment types with their own service and infrastructure definitions. Keep the outer pipeline shape (build, test, approve, deploy, verify) as a shared template and let the deploy stage vary by type. Shared approvals, policies and freezes then apply to all of them.

34. How would you handle secrets when the company already uses HashiCorp Vault?

Connect Vault as the secret manager for the relevant organizations and make it the default, so new secrets never land in the built-in store. Use a Vault auth method that does not depend on a long-lived token where possible. Delegates that read from Vault need network access to it, which affects where you place them.

35. Continuous Verification keeps failing healthy canaries. What design change do you propose?

Review the inputs, not the tool. Use metrics that reflect user impact (error rate, latency), give the canary enough traffic and duration, and set sensitivity to match the service. If the monitoring data is noisy, fix that first. A verification step that teams learn to ignore is worse than none.

36. When would you tell a company not to adopt Harness?

When a small team with a few services is well served by GitHub Actions or GitLab CI/CD plus Argo CD, the extra platform may not pay back. Harness helps most when many teams need shared templates, governance, verification and approvals. Saying this honestly in an interview shows judgement. Our CI/CD tools comparison is a good reference.

End-to-end design scenarios

37. Design the production release flow for a customer-facing API from commit to traffic.

Webhook trigger on merge to main; CI stage builds, runs tests, scans and pushes the image; deploy to QA with automated tests; approval by the service owner; canary to prod with a Verify step; full rollout; rollback on failure through the stage failure strategy. A policy blocks prod stages without approval, and a freeze covers known risky dates. Each piece answers a specific risk, which is what the interviewer is checking.

38. Design onboarding for a new team that has never used Harness.

Create their project, connect their repo, and give them the golden template with an input set filled in for their first service. Pair with them for the first deploy to dev, then let them run QA themselves. Prod access comes after they have seen a rollback work in a lower environment. Keep a short internal guide with the conventions.

39. Design a hotfix path that is fast but still controlled.

Use the same pipeline with a hotfix input set that skips long-running non-critical tests but keeps scanning, approval and verification. A named on-call approver group can approve outside business hours. Freezes allow an override only for that group. Record hotfix runs so you can review them afterwards.

40. Design the move from Jenkins scripts to Harness for a team of 15 services.

Inventory what the Jenkins jobs actually do, then map each part to Harness: build steps to CI or keep Jenkins for builds and call it from Harness at first, deploy scripts to native deployment types, manual gates to approvals. Migrate one service end to end, compare lead time and failures, then move the rest with a template. Retire the Jenkins jobs only after a few clean releases.

How the Harness question pages differ

PageFocus
This pageDesign and planning scenarios
Real-time Harness questionsLive troubleshooting of failed runs
Advanced Harness questionsExpressions, templates, delegates, governance in depth
Harness certification questionsCertification-style concepts
75+ Harness CD questionsCore continuous delivery concepts

How to prepare

  • Build one pipeline end to end in a free or trial Harness account: a service, two environments, a canary, an approval and a rollback.
  • Break it on purpose (bad image, failed verification) so you can describe what you saw.
  • Practise saying the four steps out loud for five of the scenarios above.
  • Learn the CI/CD and Kubernetes basics behind Harness. Our DevOps training in Pune (classroom in Kharadi or live online) covers pipelines, containers and Kubernetes.

FAQ

What are scenario-based Harness interview questions?

They describe a delivery requirement, such as a safe prod rollout or one pipeline for many teams, and ask how you would design it in Harness. You are judged on the features you choose, the trade-offs you name and how you would prove the design works.

How are these different from real-time Harness questions?

Real-time questions start from something broken in a live run and ask you to troubleshoot it. Scenario questions on this page start from a goal and ask you to design the setup before anything breaks.

Do I need hands-on Harness experience to answer them?

It helps a lot. Build at least one pipeline with a canary, an approval and a rollback, because interviewers ask follow-up questions that are hard to answer from reading alone.

Which deployment strategy should I recommend in an interview?

It depends on the service. Rolling suits most internal services, canary suits high-traffic services with good metrics, and blue-green suits services that need an instant switch. Explain why for the scenario you are given.

How do I enforce approvals across all Harness pipelines?

Use Harness Policy as Code with an OPA policy set at account or organization level that fails any production stage without an approval step. Templates help, but policies stop teams from bypassing them.

Does the Harness delegate need inbound firewall access?

No. The delegate runs in your network and makes outbound HTTPS connections to Harness, so you do not open inbound ports for it.

When is Harness not a good fit?

For a small team with few services, a simpler CI tool plus Argo CD may be enough. Harness pays off most when many teams need shared templates, governance and verification.

References

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.