feat: Add comprehensive nginx-mycelium deployment with global IPv6 access

This commit is contained in:
mik-tf
2025-11-05 09:00:24 -05:00
parent 7009f89f1d
commit 9f360c1528
13 changed files with 2133 additions and 0 deletions

View File

@@ -0,0 +1,126 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-mycelium
namespace: default
labels:
app: nginx-mycelium
network: mycelium
spec:
replicas: 3
selector:
matchLabels:
app: nginx-mycelium
template:
metadata:
labels:
app: nginx-mycelium
network: mycelium
spec:
containers:
- name: nginx
image: nginx:alpine
ports:
- containerPort: 80
volumeMounts:
- name: html-content
mountPath: /usr/share/nginx/html/index.html
subPath: index.html
resources:
requests:
memory: "32Mi"
cpu: "100m"
limits:
memory: "64Mi"
cpu: "200m"
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 3
periodSeconds: 5
volumes:
- name: html-content
configMap:
name: nginx-mycelium-content
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-mycelium-content
namespace: default
data:
index.html: |
<!DOCTYPE html>
<html>
<head>
<title>🌍 Mycelium Global Web Hosting</title>
<meta charset="UTF-8">
<style>
body { font-family: Arial, sans-serif; margin: 50px; background: #f0f0f0; }
.container { background: white; padding: 40px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); max-width: 800px; margin: 0 auto; }
h1 { color: #2c3e50; text-align: center; }
.success { background: #e8f4fd; padding: 20px; border-radius: 8px; border-left: 4px solid #3498db; margin: 20px 0; }
.info { background: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0; }
.urls { background: #fff3cd; padding: 20px; border-radius: 8px; border-left: 4px solid #ffc107; margin: 20px 0; }
.test { background: #d4edda; padding: 20px; border-radius: 8px; border-left: 4px solid #28a745; margin: 20px 0; }
code { background: #f8f9fa; padding: 2px 4px; border-radius: 3px; font-size: 12px; }
pre { background: #f8f9fa; padding: 10px; border-radius: 4px; font-size: 12px; color: #333; }
</style>
</head>
<body>
<div class="container">
<h1>🌍 Mycelium Global Web Hosting</h1>
<div class="success">
<h2>✅ Success!</h2>
<p><strong>This website is globally accessible via Mycelium Cloud!</strong></p>
<p>This demonstrates that you can host a real website that anyone with Mycelium can access from anywhere in the world.</p>
</div>
<div class="info">
<h3>🏗️ Technical Details</h3>
<ul>
<li><strong>Deployment:</strong> 3 nginx pods across cluster nodes</li>
<li><strong>Network:</strong> Kubernetes NodePort service for load balancing</li>
<li><strong>Global Access:</strong> Available on all 6 Mycelium IPv6 addresses</li>
<li><strong>Load Balancing:</strong> Kubernetes distributes traffic across pods</li>
</ul>
</div>
<div class="urls">
<h3>🌐 Global Access URLs</h3>
<p><strong>Your website is accessible via any Mycelium IPv6:</strong></p>
<ul>
<li><code>http://[51d:3596:6cc3:81e7:ff0f:d546:3737:4c8c]:30090</code></li>
<li><code>http://[476:c4f:b4cb:7205:ff0f:f56e:abea:6905]:30090</code></li>
<li><code>http://[538:964a:a1e1:4057:ff0f:63c7:960b:7c27]:30090</code></li>
<li><code>http://[552:5984:2d97:72dc:ff0f:39ef:6ec:a48c]:30090</code></li>
<li><code>http://[437:9faf:1f1a:e2b1:ff0f:1fd9:7fd5:1095]:30090</code></li>
<li><code>http://[5c3:a162:45ab:6c53:ff0f:8c55:36b0:24af]:30090</code></li>
</ul>
<p><em>Anyone with Mycelium can access your website from anywhere!</em></p>
</div>
<div class="test">
<h3>🚀 Load Balancing Test</h3>
<p>Test if load balancing is working:</p>
<pre>curl -H "Cache-Control: no-cache" http://[51d:3596:6cc3:81e7:ff0f:d546:3737:4c8c]:30090</pre>
<p>Try multiple requests to see traffic distribute across different pods!</p>
</div>
<div style="text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid #dee2e6;">
<p>
<strong>Mycelium Cloud</strong> • Real Global Internet Infrastructure<br>
<em>Deploy once, access worldwide! 🌍</em>
</p>
</div>
</div>
</body>
</html>