-
Notifications
You must be signed in to change notification settings - Fork 195
[Docs] Add Kubernetes Component Configuration Reference Guide #1110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PARTH-TUSSLE
wants to merge
2
commits into
layer5io:master
Choose a base branch
from
PARTH-TUSSLE:Audit-of-Kubernetes-component-configuration-properties-and-descriptions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| --- | ||
| title: Kubernetes Components Reference | ||
| description: A no-fluff guide to configuring Kubernetes components in Kanvas. | ||
| weight: 20 | ||
| categories: [Designer, Reference] | ||
| tags: [kubernetes, configuration] | ||
| --- | ||
|
|
||
| When designing infrastructure in Kanvas, dragging complex Kubernetes components (like a Service or Deployment) onto the canvas opens a configuration panel. This panel exposes the underlying YAML specification as editable fields. | ||
|
|
||
| This reference guide explains the most commonly used configuration properties for Kubernetes components, providing clarity on expected syntax, typical values, and how these settings affect your cluster's behavior. | ||
|
|
||
| ## Kubernetes Deployment | ||
|
|
||
| A Deployment provides declarative updates for Pods and ReplicaSets. It allows you to describe an application's lifecycle, such as which images to run, how many replicas there should be, and the strategy for updating them. | ||
|
|
||
| ### General Configurations | ||
|
|
||
| * **`replicas`** *(integer)* | ||
| * **What it does:** Specifies the desired number of identical Pods to run concurrently. | ||
| * **Behavior:** If set to `3`, Kubernetes' control loop continuously monitors the cluster to ensure exactly 3 Pods are running. If a Pod crashes or is deleted, a replacement is automatically provisioned. | ||
|
|
||
| * **`selector`** *(object)* | ||
| * **What it does:** A label query over Pods that should match the replica count. | ||
| * **Behavior:** This tells the Deployment exactly *which* Pods it is responsible for managing. The selector must exactly match the labels defined in the `template`. | ||
|
|
||
| * **`template`** *(object)* | ||
| * **What it does:** The blueprint used to create new Pods. | ||
| * **Behavior:** It contains the metadata (like labels) and the `spec` (like `containers`, `images`, and `ports`) for every Pod managed by this Deployment. | ||
|
|
||
| * **`revisionHistoryLimit`** *(integer)* | ||
| * **What it does:** Specifies the number of old ReplicaSets to retain to allow rollback. | ||
| * **Behavior:** Defaults to `10`. If set to `0`, you cannot roll back to previous versions of the Deployment. | ||
|
|
||
| * **`paused`** *(boolean)* | ||
| * **What it does:** Indicates whether the deployment is paused. | ||
| * **Behavior:** If set to `true`, you can apply multiple updates to the Deployment without triggering a rollout until it is unpaused. Useful for batching multiple changes at once. | ||
|
|
||
| ### Rollout Strategies and Health | ||
|
|
||
| * **`strategy`** *(object)* | ||
| * **What it does:** Describes the update strategy used to replace existing Pods with new ones when the Deployment is updated (e.g., when changing the container image). | ||
| * **Expected values:** | ||
| * `RollingUpdate` (Default): Gradually replaces old Pods with new ones, ensuring zero downtime. | ||
| * `Recreate`: Terminates all existing Pods before creating new ones, causing temporary downtime but avoiding version mixing. | ||
|
|
||
| * **`minReadySeconds`** *(integer)* | ||
| * **What it does:** The minimum number of seconds a newly created Pod should be "ready" (without any of its containers crashing) for it to be considered fully available. | ||
| * **Behavior:** This is crucial for rolling updates. It artificially slows down the rollout to ensure the newly started application actually remains stable before tearing down the older instances. | ||
|
|
||
| * **`progressDeadlineSeconds`** *(integer)* | ||
| * **What it does:** The maximum time in seconds the Deployment controller waits for a rollout to make progress before considering it "failed". | ||
| * **Behavior:** If a new Pod gets stuck in a crash loop due to a bad configuration or image, the Deployment will stop trying to roll out after this deadline (defaults to `600s`) and report a `ProgressDeadlineExceeded` error condition. | ||
|
|
||
| --- | ||
|
|
||
| ## Kubernetes Service | ||
|
|
||
| A Service is an abstract way to expose an application running on a set of Pods as a network service. Since Pods are ephemeral and their IP addresses change, a Service provides a stable endpoint. | ||
|
|
||
| ### Networking and Routing | ||
|
|
||
| * **`type`** *(string)* | ||
| * **What it does:** Determines how the Service is exposed to the network. | ||
| * **Expected values:** | ||
| * `ClusterIP` (Default): Exposes the Service on an internal IP. Only reachable from within the cluster. | ||
| * `NodePort`: Exposes the Service on a static port on each Node's IP. Reachable from outside the cluster. | ||
| * `LoadBalancer`: Provisions a cloud provider's external load balancer to expose the Service to the public internet. | ||
| * `ExternalName`: Maps the Service to a DNS name (e.g., `db.example.com`). | ||
|
|
||
| * **`selector`** *(object)* | ||
| * **What it does:** Key-value pairs used to identify which Pods this Service should route traffic to. | ||
| * **Behavior:** If a Service has a selector of `app: frontend`, it will automatically discover and load-balance traffic across all Pods in the namespace that possess the `app: frontend` label. | ||
|
|
||
| * **`ports`** *(array)* | ||
| * **What it does:** Defines the network ports exposed by the Service. | ||
| * **Expected values:** Contains objects with the following keys: | ||
| * `port`: The stable port exposed by the Service itself. | ||
| * `targetPort`: The port on the underlying Pod that the traffic is forwarded to. | ||
| * `protocol`: Typically `TCP`, `UDP`, or `SCTP`. | ||
|
|
||
| * **`clusterIP`** *(string)* | ||
| * **What it does:** The stable internal IP address of the service. | ||
| * **Behavior:** Usually left blank to be assigned automatically by Kubernetes. It can be explicitly set to `None` to create a "Headless Service." Headless Services bypass the typical load-balancing proxy and instead allow clients to directly resolve the IP addresses of the individual backing Pods via DNS. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.