-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
23 changed files
with
373 additions
and
68 deletions.
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -99,6 +99,7 @@ | |
width: 100%; | ||
height: 45vh; | ||
margin-right: 20px; | ||
margin-top: 3rem; | ||
-webkit-flex: 1; | ||
flex: 1; | ||
|
||
|
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+810 KB
assets/images/posts/2024-08-14-infrastructure-design-by-meshery/deep-dive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
catalog/067737d5-1c7e-4135-b879-44cb4ed07876/0.0.1/artifacthub-pkg.yml
This file contains 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,24 @@ | ||
version: 0.0.1 | ||
name: nginx-with-init-container-and-vhost | ||
displayName: NGINX with init container and vhost | ||
createdAt: "2024-03-02T07:00:15Z" | ||
description: This design involves setting up NGINX using an init container to handle initialization tasks before the main NGINX container starts. The init container is responsible for configuration setup, such as generating or fetching configuration files. The Virtual Host (VHost) configuration allows NGINX to host multiple domains on a single server, each with its own configuration. This setup ensures a clean separation of initialization logic and main server functionality, enhancing modularity and maintainability. | ||
logoURL: https://raw.githubusercontent.com/meshery/meshery.io/0b8585231c6e2b3251d38f749259360491c9ee6b/assets/images/brand/meshery-logo.svg | ||
license: Apache-2.0 | ||
homeURL: https://docs.meshery.io/concepts/logical/designs | ||
links: | ||
- name: download | ||
url: ../../catalog/067737d5-1c7e-4135-b879-44cb4ed07876/0.0.1/design.yml | ||
- name: Meshery Catalog | ||
url: https://meshery.io/catalog | ||
readme: "1. Init Container Overhead: Using an init container adds a slight delay to the startup process, as it must complete its tasks before the main NGINX container can start.\n\n2.Configuration Management: Ensure that the init container correctly manages and updates the configuration files, as any errors can prevent NGINX from starting properly.\n\n3. Security: Validate and sanitize any external inputs or configurations handled by the init container to avoid security vulnerabilities.\n\n4. Resource Allocation: Allocate sufficient resources for both the init and main containers to prevent performance bottlenecks.\n\n5. Maintenance Complexity: This setup adds an extra layer of complexity, so proper documentation and monitoring are essential for ongoing maintenance.\n\n6.Compatibility: Ensure that the version of NGINX used is compatible with the init container's setup and the desired VHost configurations. \n ##h4 Caveats and Consideration \n" | ||
install: mesheryctl design import -f | ||
provider: | ||
name: e38890c8-1b66-4a72-ae40-a8ae4a64af6c | ||
screenshots: | ||
- title: MeshMap Snapshot | ||
url: https://raw.githubusercontent.com/layer5labs/meshery-extensions-packages/master/action-assets/design-assets/067737d5-1c7e-4135-b879-44cb4ed07876-light.png | ||
- title: MeshMap Snapshot | ||
url: https://raw.githubusercontent.com/layer5labs/meshery-extensions-packages/master/action-assets/design-assets/067737d5-1c7e-4135-b879-44cb4ed07876-dark.png | ||
- title: Meshery Project | ||
url: https://raw.githubusercontent.com/meshery/meshery.io/master/assets/images/logos/meshery-gradient.png |
63 changes: 63 additions & 0 deletions
63
catalog/067737d5-1c7e-4135-b879-44cb4ed07876/0.0.1/design.yml
This file contains 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,63 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: spoon-app | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: spoon-node | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: spoon-node | ||
spec: | ||
volumes: | ||
- name: www | ||
containers: | ||
- name: spooner | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
volumeMounts: | ||
- name: www | ||
mountPath: /usr/share/nginx/html/ | ||
initContainers: | ||
- name: git | ||
image: alpine | ||
command: [ "sh", "-c", "apk add git && sleep 5 && git clone https://github.com/octocat/Spoon-Knife /www" ] | ||
volumeMounts: | ||
- name: www | ||
mountPath: /www/ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: spoon-cip | ||
name: spoon-cip | ||
spec: | ||
ports: | ||
- port: 80 | ||
protocol: TCP | ||
targetPort: 80 | ||
selector: | ||
app: spoon-node | ||
type: ClusterIP | ||
|
||
--- | ||
apiVersion: networking.k8s.io/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: ingress-spoon | ||
annotations: | ||
nginx.ingress.kubernetes.io/rewrite-target: / | ||
spec: | ||
rules: | ||
- host: test2.lab.as73.inetsix.net | ||
http: | ||
paths: | ||
- path: / | ||
backend: | ||
serviceName: spoon-cip | ||
servicePort: 80 |
48 changes: 48 additions & 0 deletions
48
catalog/29b94780-865c-460b-b852-cc5c31730561/0.0.5/artifacthub-pkg.yml
This file contains 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,48 @@ | ||
version: 0.0.5 | ||
name: nginx-k8s-deployment | ||
displayName: nginx k8s deployment | ||
createdAt: "2024-08-13T23:14:15Z" | ||
description: |- | ||
The design represented by the nginx-deployment.yaml file sets up a basic web server infrastructure using Kubernetes resources. | ||
Key Components: | ||
Namespace (nginx-namespace): | ||
A separate namespace called nginx-namespace is created to isolate and organize the Nginx application and its resources from other applications running in the cluster. | ||
Deployment (nginx-deployment): | ||
Deploys a web server using the Nginx image (nginx:latest). | ||
Two replicas (instances) of the Nginx server are created, ensuring high availability and load distribution across multiple pods. | ||
Each pod in the deployment runs the Nginx container and listens on port 80. | ||
Service (nginx-service): | ||
Exposes the Nginx application to the external network via a LoadBalancer service type. | ||
The service forwards traffic from external clients to the Nginx pods on port 80, making the web server accessible outside the cluster. | ||
The service ensures that traffic is balanced between the two Nginx pods. | ||
Purpose of the Design: | ||
This design demonstrates how to deploy a simple, scalable web server using Kubernetes. By visualizing this in Meshery, you can: | ||
Understand the relationship between different Kubernetes resources (Namespace, Deployment, and Service). | ||
Observe how traffic flows from external clients through the LoadBalancer to the Nginx pods. | ||
Learn the basics of deploying and managing stateless applications in Kubernetes. | ||
Use this as a foundation to explore more advanced Kubernetes concepts like autoscaling, rolling updates, and integration with service meshes. | ||
In summary, this design sets up a highly available Nginx web server with external access and load balancing, making it a fundamental example of how to deploy and expose applications using Kubernetes. | ||
logoURL: https://raw.githubusercontent.com/meshery/meshery.io/0b8585231c6e2b3251d38f749259360491c9ee6b/assets/images/brand/meshery-logo.svg | ||
license: Apache-2.0 | ||
homeURL: https://docs.meshery.io/concepts/logical/designs | ||
links: | ||
- name: download | ||
url: ../../catalog/29b94780-865c-460b-b852-cc5c31730561/0.0.5/design.yml | ||
- name: Meshery Catalog | ||
url: https://meshery.io/catalog | ||
readme: "1. LoadBalancer Requirement: Needs a cloud provider or environment that supports LoadBalancer services; otherwise, external access might not work.\n2. Namespace Conflicts: Ensure the nginx-namespace is properly managed to avoid conflicts with existing resources.\n3. Resource Availability: The cluster must have enough resources to run the two Nginx replicas.\nDefault Nginx Config: Uses basic Nginx settings; not suitable for production without customization. \n ##h4 Caveats and Consideration \n" | ||
install: mesheryctl design import -f | ||
provider: | ||
name: 551da661-8632-415f-b69f-ecb298b88575 | ||
screenshots: | ||
- title: MeshMap Snapshot | ||
url: https://raw.githubusercontent.com/layer5labs/meshery-extensions-packages/master/action-assets/design-assets/29b94780-865c-460b-b852-cc5c31730561-light.png | ||
- title: MeshMap Snapshot | ||
url: https://raw.githubusercontent.com/layer5labs/meshery-extensions-packages/master/action-assets/design-assets/29b94780-865c-460b-b852-cc5c31730561-dark.png | ||
- title: Meshery Project | ||
url: https://raw.githubusercontent.com/meshery/meshery.io/master/assets/images/logos/meshery-gradient.png |
3 changes: 3 additions & 0 deletions
3
catalog/29b94780-865c-460b-b852-cc5c31730561/0.0.5/design.yml
This file contains 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,3 @@ | ||
name: nginx k8s deployment | ||
version: 0.0.5 | ||
services: {} |
Oops, something went wrong.