Add docs.

This commit is contained in:
6 changed files with 503 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
@startuml K3s Infrastructure Deployment Workflow
skinparam ConditionEndStyle hline
title K3s Kubernetes Cluster Deployment Workflow
|#AntiqueWhite|Client|
|#LightBlue|Terraform|
|#PaleGreen|Server Node|
|#LightSalmon|Worker Nodes|
|Client|
start
:Prepare SSH Authentication;
note right: SSH key pair must be available at the specified path
|Terraform|
:Read Input Variables (Dev Environment);
note right: server_ip, worker_ips, ssh_user, ssh_private_key, and other parameters
:Setup SSH Config;
note right: Creates temporary SSH config for secure connections
|Server Node|
:Install K3s Server;
note right
Uses curl to download and run K3s installer
Configures node as a Kubernetes server
end note
:Store Kubeconfig;
:Generate Node Token;
note right: Required for worker nodes to join the cluster
|Terraform|
:Retrieve K3s Kubeconfig;
note right
Gets k3s.yaml configuration
Makes it accessible locally
Updates server URL in config
end note
:Retrieve Node Token;
note right: Securely transfer the token to local environment
|Worker Nodes|
fork
:Worker Node 1;
note right: For each worker node in parallel
fork again
:Worker Node 2;
end fork
|Terraform|
:Copy Node Token to Workers;
note right: Securely transfer the join token to each worker
|Worker Nodes|
fork
:Install K3s Agent (Worker 1);
note right
Installs K3s in agent mode
Connects to server using token
Registers as a worker node
end note
fork again
:Install K3s Agent (Worker 2);
end fork
|Terraform|
:Cluster is Ready;
note right
All nodes are provisioned
Kubeconfig is available locally
Cluster can be accessed via kubectl
end note
|Client|
:Access Kubernetes Cluster;
note right: Using generated kubeconfig at ~/.kube/config or as specified
stop
footer Infrastructure Deployment Process - Version 1.0
@enduml