Skip to main content

Understanding Resources in Ankra

In Ankra, a resource is a core element used to define configuration states across your infrastructure. This includes Kubernetes configurations (e.g., versioning, manifests), package management, and integrations with services like AWS. Resources are the primary units Ankra tracks, automates, and manages, allowing you to maintain the consistency and reliability of your environment.

This guide will explain the structure and workflow around resources, how they are created, and how Ankra automates them via jobs and operations.

What is a Resource in Ankra?

A resource in Ankra is any configuration parameter or object that reflects a particular state within your infrastructure. It can include, but is not limited to:

  • Kubernetes versions on nodes
  • Packages installed on each machine, managed by Ankra
  • Kubernetes manifests, which define the desired state of your cluster
  • AWS services, such as EC2 instances or VPCs
  • Their realized representations in the system, such as Kubernetes Pods (kubectl describe pod) or AWS instances (describe-instance in AWS CLI)

These resources are continuously tracked by the platform, allowing Ankra to monitor, reconcile, and automate the state of your infrastructure.

Resource Tracking

Every resource Ankra tracks is based on the realized configuration state. This means that Ankra continuously compares the actual state of your systems against the desired state defined in its internal configuration.

For example, if a Kubernetes node is running an outdated version, Ankra detects the discrepancy and, while the platform is working on automating kubernetes upgrades, if an AWS or kubernetes configuration deviates from the desired state, Ankra reconciles it automatically.

Jobs and Operations: Automating Resource Management

Ankra's platform is designed around the concept of jobs and operations to automate resource management.

Jobs

A job in Ankra is a unit of work that automates a specific task related to a resource. Jobs can include actions like:

  • Reproducing Kubernetes configurations across environments
  • Deploying new manifests in a Kubernetes cluster
  • Modifying AWS instances or applying new configurations to cloud services

Jobs are designed to operate efficiently, allowing you to automate routine tasks and ensure that your infrastructure remains consistent with your desired state.

Operations

An operation is a collection of jobs executed as part of a broader infrastructure change or update. Operations allow for batch processing of multiple jobs across different resources. For instance, an operation could involve:

  • Applying a set of configuration changes across multiple Kubernetes clusters
  • Automating the deployment of new configurations across your cloud infrastructure
  • Reproducing infrastructure configurations across different environments

Operations provide a more scalable, streamlined approach to managing large environments where changes need to be made to multiple resources in a coordinated manner.

How Resources, Jobs, and Operations Interact

Here’s how these components interact:

  1. Resource Detection and Tracking: Ankra continuously monitors the current state of your infrastructure, tracking resources such as Kubernetes configurations, packages, and AWS services.
  2. Job Creation: When a change is required (e.g., reproducing a Kubernetes cluster in another environment or adjusting AWS configurations), Ankra creates a job to perform the task.
  3. Operations: For larger updates or group changes, Ankra bundles multiple jobs into an operation, ensuring that all changes happen in sequence and without conflict.
  4. State Reconciliation: After jobs and operations are executed, Ankra checks that the state of each resource is successfully updated, ensuring that your infrastructure matches the desired configuration.

Use Cases

Example: Reproducing Kubernetes Cluster Configurations

Imagine your team needs to reproduce the configuration of an existing Kubernetes cluster across multiple environments, ensuring consistency in both development and production. With Ankra’s resource-based approach, this process is automated and streamlined.

  1. Ankra captures the exact realized configuration of the Kubernetes cluster, including versions, manifests, and installed packages.
  2. The platform generates the necessary jobs to reproduce this configuration in a new environment or on a different cluster.
  3. These jobs include setting up the Kubernetes nodes, applying manifests, and installing the required packages across the new environment.
  4. Once the jobs are executed, Ankra verifies that the new cluster reflects the original configuration exactly, ensuring full reproducibility.

In case a user requires upgrades to the cluster, Ankra currently handles this as a support request. Our team works closely with customers to manually assist with upgrading their systems, ensuring that the process is seamless and efficient. However, Ankra is actively working on automating upgrades, which will soon be available as a feature within the platform.

Conclusion

Ankra's approach to resource management, combined with automated jobs and operations, provides an efficient, scalable, and auditable way to manage your infrastructure. By treating each configuration parameter or service state as a resource, Ankra offers a streamlined, automated approach to maintaining and reproducing infrastructure, reducing the need for manual intervention.

Whether managing Kubernetes clusters, Linux systems, or cloud services like AWS, Ankra ensures that your infrastructure stays aligned with your desired state, minimizing risks and maintaining operational efficiency.