first try
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nimh-static-files
|
||||
namespace: nimh
|
||||
|
||||
data:
|
||||
index.html: |
|
||||
{{ file.Read "../site/index.html" | strings.Indent 4}}
|
||||
@@ -0,0 +1,31 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nimh-static
|
||||
|
||||
spec:
|
||||
replicas: 1
|
||||
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nimh-static
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nimh-static
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:stable
|
||||
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
||||
volumeMounts:
|
||||
- name: static-files
|
||||
mountPath: /var/nimh-static/site
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: static-files
|
||||
configMap:
|
||||
name: nimh-static-files
|
||||
@@ -0,0 +1,4 @@
|
||||
resources:
|
||||
- configmap.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
@@ -4,4 +4,11 @@ metadata:
|
||||
name: nimh-static
|
||||
spec:
|
||||
selector:
|
||||
app.hubernetes.io/name: proxy
|
||||
app: nimh-static
|
||||
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
nodePort: 30080
|
||||
|
||||
type: NodePort
|
||||
|
||||
Reference in New Issue
Block a user