Skip to content

Commit

Permalink
udpates
Browse files Browse the repository at this point in the history
Signed-off-by: (Bit-Mage) <[email protected]>
  • Loading branch information
(Bit-Mage) committed Oct 13, 2024
1 parent 1eb8896 commit 0d4c65e
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 4 deletions.
5 changes: 1 addition & 4 deletions Content/20231227155636-development.org
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ Given a Dependency [[id:179b5b39-234a-4d0c-afde-c3b81409760c][Relationship]], li
- Development
- [[id:17d78466-2fcc-47aa-af20-9b74d94c96bb][Testing]]
- Production
** The Twelve Factor App
:PROPERTIES:
:ID: 7a450c24-000e-4262-8632-b07f8a4d1df9
:END:
** [[id:64ef7555-7eda-49ed-82d4-e393ef1cccd2][The Twelve Factor App]]
- https://12factor.net/

** Idempotence
Expand Down
1 change: 1 addition & 0 deletions Content/20240215121050-kubernetes.org
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ see [[id:f822f8f6-89eb-4aa8-ac8f-fdcff3f06fb9][Orchestration]]
* Stream
** 0x22E2
- reading https://sookocheff.com/post/kubernetes/understanding-kubernetes-networking-model/
- reading up on ConfigMaps
** 0x22E1
- the <git vc host>/kubernetes/hack/ is useful
- charting the kubernetes source code
Expand Down
41 changes: 41 additions & 0 deletions Content/20240728172219-coredns.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,44 @@
:END:
#+title: CoreDNS
#+filetags: :network:cloud-native:cncf:

* Overview

- CoreDNS:
- flexible and extensible DNS server that can serve as a kube-dns replacement in [[id:c2072565-787a-4cea-9894-60fad254f61d][Kubernetes]] environments.
- written in Go and can handle multiple DNS protocols.

- Key Features:
- Modularity: CoreDNS features a plugin-based architecture, allowing users to enable only the DNS features they need.
- Plugins: Some essential plugins are health checks, cache functionality, load-balancing, and more.
- Performance: Optimizes DNS response times and scales efficiently in cloud-native environments.

- Deployment and Use Cases:
- Primarily used within Kubernetes clusters to resolve service names and other DNS records.
- Can be used for service discovery in microservices architectures, external DNS resolution, and more.

- CNCF and Community:
- CoreDNS is a graduated project within the Cloud Native Computing Foundation (CNCF), indicating a mature community and governance policy.
- Regular contributions and updates from a wide community base enhance its stability and security.

- Comparisons:
- Compared to traditional DNS solutions, CoreDNS offers better integration with Kubernetes.
- Unlike BIND, CoreDNS is focused on extensibility rather than merely offering comprehensive DNS services out-of-the-box.

* CoreDNS Plugins Overview
- CoreDNS is a flexible and scalable DNS server.
- CoreDNS can be extended and customized through plugins.
- Plugins allow CoreDNS to serve various use cases, such as:
- Caching
- Load balancing
- Service discovery
- CoreDNS comes with a collection of built-in plugins.

- Key Built-in Plugins
- *Cache*: Caches DNS responses to improve performance and decrease load.
- *Forward*: Forwards queries to other nameservers, usually upstream.
- *Grpc*: Provides functionalities over gRPC, applicable within service meshes.
- *[[id:c2072565-787a-4cea-9894-60fad254f61d][Kubernetes]]*: Provides service discovery for Kubernetes clusters by managing DNS entries for Kubernetes resources.
- *[[id:55a62ff7-7160-4e6e-9bb5-0df996bf995e][Prometheus]]*: Offers metrics collection and exposes them in a format compatible with Prometheus.
- *Rewrite*: Allows modification of incoming DNS queries before processing.
- *Health*: Provides a health endpoint for monitoring the state of CoreDNS.
3 changes: 3 additions & 0 deletions Content/20241013062649-dns_domain_name_system.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
:END:
#+title: DNS (Domain Name System)
#+filetags: :network:cs:

* Forks
** [[id:74d7c3e9-bf98-4311-a95c-c9674e61fe97][K8S DNS]]
19 changes: 19 additions & 0 deletions Content/20241013071827-k8s_dns.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:PROPERTIES:
:ID: 74d7c3e9-bf98-4311-a95c-c9674e61fe97
:END:
#+title: K8S DNS
#+filetags: :network:k8s:

* Overview
** [[id:c2072565-787a-4cea-9894-60fad254f61d][Kubernetes]] (K8S) DNS Overview
- Kubernetes includes a built-in [[id:c1875db1-be4d-43fe-9c88-bf5fc7a95df3][DNS]] server that correlates with the services within the cluster.
- When a new service is created, the DNS server is notified and can manage DNS records accordingly.
- DNS names follow the format =<service-name>.<namespace>.svc.cluster.local=.
- The DNS server helps with service discovery, allowing Kubernetes services to communicate seamlessly.
- [[id:d3f2c59a-602d-4a88-8828-82797f25fbd3][CoreDNS]] is the default DNS solution from version 1.13 onwards, replacing kube-dns.

** Functional Components of K8S DNS
- Service Discovery: Simplifies the process of finding and connecting with services by names rather than IPs.
- Pod DNS Resolution: Each pod can query the DNS system, facilitating interaction with other services.
- ClusterDNS: Configures kubelets to communicate with the DNS server for name resolutions.
- CoreDNS Configuration: Provides flexibility and supports various plugins for handling DNS queries efficiently.
53 changes: 53 additions & 0 deletions Content/20241013114731-the_twelve_factor_app.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
:PROPERTIES:
:ID: 64ef7555-7eda-49ed-82d4-e393ef1cccd2
:END:
#+title: The Twelve Factor App
#+filetags: :cs:

* Overview
The twelve-factor app is a methodology for building software-as-a-service applications that aims to maximize portability, resilience, and scalability.
* the 12 factors
** Codebase:
- A twelve-factor app always has a one-to-one correlation between the codebase and the app.
- Various deploys of the app (e.g., staging, production) should be from the same codebase, facilitating easier deployment and management.
** Dependencies:
- Dependencies should be explicitly declared and isolated to ensure consistency in different environments.
- Use dependency managers and tools that mechanize this isolation and declaration (e.g., pip for Python, Maven for Java).
** Configuration:
- Configuration should be external and separate from the codebase, typically managed via environment variables.
- This allows for seamless changes without code alterations.
** Backing Services:
- Treat backing services (e.g., databases, queues) as attached resources, abstracting them through well-defined APIs.
- This abstraction allows swapping of backing services without disruption.
** Build, Release, Run:
- Strict separation between the build, release, and run stages to enable continuous delivery and integration.
- Builds should be versioned and contain all dependencies, while releases should combine builds with their respective configs.
** Processes:
- The app should be executed as one or more stateless processes. Persist any state to external backing services.
** Port Binding:
- Adopts an explicit port binding for web apps, making them self-contained and independent of language-specific execution environments.
** Concurrency:
- Scale out via the process model by running multiple identical processes. It facilitates better resource usage and fault tolerance.
** Disposability:
- Prioritize fast startup and graceful shutdown of processes to adapt to changes in scaling and code changes rapidly.
** Dev/Prod Parity:
- Maintain minimal divergence between development and production environments to minimize deployment gaps and debugging effort.
** Logs:
- Treat logs as event streams, ensuring they can be routed to various log destinations for analysis and audit.
** Admin Processes:
- Any administrative or management tasks should be run as one-off processes, separate from the regular app runtime.
* Connections:
- The principles ensure a high degree of portability, reducing risks when changing environments (e.g., moving between cloud providers).
- Emphasizes automation and simplification for easier integration with CI/CD pipelines.
- By isolating states and dependencies, eases the process of scaling out operations.

* Critique and Further Exploration:
- While twelve-factor app methodology provides a firm structure for SaaS applications, it might require adaptation for highly specialized legacy systems.
- Investigate variations of twelve-factor methodology suited for microservices or serverless architectures.

* Ideation Strategies for Improvement:
- Consistently review the twelve factors in the context of your application to identify opportunities for optimization and refinement.
- Consider adopting twelve-factor principles incrementally to existing applications.

* Resources
- https://12factor.net/

0 comments on commit 0d4c65e

Please sign in to comment.