83 lines
1.8 KiB
YAML
83 lines
1.8 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: test-html
|
|
namespace: default
|
|
data:
|
|
index.html: |
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>K3s Test Page</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
margin: 0;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
}
|
|
.container {
|
|
text-align: center;
|
|
padding: 40px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 10px;
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
h1 { font-size: 3em; margin: 0; }
|
|
p { font-size: 1.2em; margin-top: 20px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>🚀 K3s Cluster Running!</h1>
|
|
<p>Domain: *.u6.net3w.com</p>
|
|
<p>Powered by Caddy + K3s</p>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: test-html
|
|
namespace: default
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: test-html
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: test-html
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx:alpine
|
|
ports:
|
|
- containerPort: 80
|
|
volumeMounts:
|
|
- name: html
|
|
mountPath: /usr/share/nginx/html
|
|
volumes:
|
|
- name: html
|
|
configMap:
|
|
name: test-html
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: test-html
|
|
namespace: default
|
|
spec:
|
|
selector:
|
|
app: test-html
|
|
ports:
|
|
- port: 80
|
|
targetPort: 80
|
|
type: ClusterIP
|