Initial commit: Add demo nginx application
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
17
README.md
Normal file
17
README.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Demo Application
|
||||||
|
|
||||||
|
这是一个由ArgoCD管理的示例应用。
|
||||||
|
|
||||||
|
## 应用信息
|
||||||
|
- **应用名称**: demo-nginx
|
||||||
|
- **镜像**: nginx:1.25-alpine
|
||||||
|
- **副本数**: 2
|
||||||
|
- **访问端口**: NodePort 30080
|
||||||
|
|
||||||
|
## 更新应用
|
||||||
|
修改 `manifests/` 目录下的文件并提交到Git,ArgoCD会自动同步部署。
|
||||||
|
|
||||||
|
## 测试访问
|
||||||
|
```bash
|
||||||
|
curl http://<NODE_IP>:30080
|
||||||
|
```
|
||||||
27
manifests/deployment.yaml
Normal file
27
manifests/deployment.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: demo-nginx
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: demo-nginx
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: demo-nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: nginx:1.25-alpine
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "200m"
|
||||||
13
manifests/service.yaml
Normal file
13
manifests/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: demo-nginx
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
app: demo-nginx
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
nodePort: 30080
|
||||||
Reference in New Issue
Block a user