Skip to content

viktor-cech/matrix-path-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matrix Path Finder (Kubernetes Job)

This project implements a pathfinding algorithm that calculates the minimum-cost path in a matrix using only rightward and downward moves, starting from the top-left cell and ending at the bottom-right.
The computation is containerized using Docker and deployed as a Kubernetes Job, with the input matrix provided via a ConfigMap.


Table of Contents

Project Structure

matrix-path/
├── Dockerfile          # Container definition for the matrix job
├── main.py             # Python script with pathfinding logic
├── matrix.txt          # Input matrix file (used in ConfigMap)
├── job.yaml            # Kubernetes Job definition
└── README.md           # README.md file

Requirements

  • Docker
  • Kind (Kubernetes in Docker)
  • kubectl

Installation

  1. Clone the repository (if not already done):
    git clone https://your-repo-url/matrix-path.git
    cd matrix-path
  2. Build the Docker image:
    docker build -t matrix-job:latest .
  3. Create a local Kubernetes cluster using Kind:
    kind create cluster --name matrix-cluster
  4. Load the Docker image into the Kind cluster:
    kind load docker-image matrix-job:latest --name matrix-cluster
  5. Create a ConfigMap from your input matrix:
    kubectl create configmap matrix-config --from-file=matrix.txt
  6. Deploy the Kubernetes Job:
    kubectl apply -f job.yaml
  7. Check the Job's output:
    kubectl logs job/matrix-path-job

Usage

After completing the installation steps:

  1. Ensure the ConfigMap and Job are created (see Installation).
  2. To check the status of the job:
    kubectl get jobs
  3. To view the logs/output of the job:
    kubectl logs job/matrix-path-job

Feel free to modify matrix.txt with your own matrix input.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors