40 lines
626 B
YAML
40 lines
626 B
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: testsite
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: webdir
|
|
namespace: testsite
|
|
data:
|
|
index.html: |
|
|
<html>
|
|
<head>
|
|
<title>Blank page</title>
|
|
</head>
|
|
<body>
|
|
Nothing here to see.
|
|
</body>
|
|
</html>
|
|
---
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: static-nginx
|
|
namespace: testsite
|
|
labels:
|
|
app: web-backend
|
|
spec:
|
|
containers:
|
|
- name: webserver
|
|
image: nginx:alpine
|
|
volumeMounts:
|
|
- name: webdir
|
|
mountPath: /usr/share/nginx/html
|
|
volumes:
|
|
- name: webdir
|
|
configMap:
|
|
name: webdir
|
|
|