Skip to main content

Accessing Clouddriver Endpoints to help in Troubleshooting Armory Scale Agent issues

Introduction

Customers using Armory Agent for Kubernetes may run into issues when running Kubernetes deployments.  Customers may want to access CloudDriver endpoints for the purpose of Troubleshooting Armory Scale Agent issues.  The article below touches upon accessing the endpoints in Clouddriver to help in the troubleshooting. For details on accessing Scale Agent Endpoints, please visit: https://support.armory.io/support?id=kb_article_view&sysparm_article=KB0010602

Prerequisites

  • Armory Enterprise Spinnaker with Armory Agent for Kubernetes enabled.* Access to the cluster in which Spinnaker services are deployed.* Users would also require to port-forward the Clouddriver port 7002 to access Clouddriver endpoints. The process to do so can be found below in the Instructions section.

Instructions

Port Forward to access Clouddriver ports

To port forward to access the Clouddriver service on port 7002, execute the below command. Post running the command, the Clouddriver service shall be accessible on localhost:7002  kubectl port-forward svc/spin-clouddriver -n spinnaker-namespace 7002:7002

List agents, accounts, and the Clouddriver instances they are connected to

The below endpoint returns a JSON response that contains

  • The list of agents* The accounts each agent is accessing* The specific Clouddriver pods that the Agents are connected to/registered with curl -kv http://localhost:7002/armory/agents

Attain the steps that a deploy operation went through

When a deployment stage that contains an Agent account is triggered, an operation ID is generated by the plugin and this operation undergoes a series of steps.

  • The request first gets received by a Clouddriver instance.* If there are multiple replicas of Clouddriver, the operation then gets passed on to the specific Clouddriver instance which is connected to/registered with the Armory Agent making the request using the lookup table.  It correlates it with the account where the deployment is supposed to be triggered.* The operation is then passed on to the Agent.* Once the Agent deploys the operation, the operation follows the return route where it gets passed on to the corresponding Clouddriver instances and then finally returns the response to Orca. Below is the endpoint to track the steps that the operation went through curl -kv http://localhost:7002/armory/agent/operations/{opId} In the case of an error, the operation ID should be displayed in the Spinnaker Console UI.  However, if you need to locate the operation ID for a successful execution, please query the backend table, kubesvc_ops_history.  For more information on querying tables related to Agent, please read the following KB article: https://support.armory.io/support?id=kb_article&sysparm_article=KB0010603.

List Clouddriver instances

Invoking the below endpoint would return the list of Clouddriver replicas that have the plugin enabled curl -kv http://localhost:7002/armory/clouddrivers