新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: todo-web
|
||||
labels:
|
||||
kiamol: ch21
|
||||
spec:
|
||||
rules:
|
||||
- host: todo.kiamol.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: todo-web
|
||||
servicePort: 80
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: todo-web
|
||||
labels:
|
||||
kiamol: ch21
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: todo-list
|
||||
component: web
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: todo-web
|
||||
labels:
|
||||
kiamol: ch21
|
||||
spec:
|
||||
ports:
|
||||
- port: 8021
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: todo-list
|
||||
component: web
|
||||
type: LoadBalancer
|
||||
@@ -0,0 +1,41 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: todo-web
|
||||
labels:
|
||||
kiamol: ch21
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: todo-list
|
||||
component: web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: todo-list
|
||||
component: web
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: kiamol/ch20-todo-list
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: "/app/config"
|
||||
readOnly: true
|
||||
- name: secret
|
||||
mountPath: "/app/secrets"
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: todo-list-config
|
||||
items:
|
||||
- key: config.json
|
||||
path: config.json
|
||||
- name: secret
|
||||
secret:
|
||||
secretName: todo-list-secret
|
||||
defaultMode: 0400
|
||||
items:
|
||||
- key: secrets.json
|
||||
path: secrets.json
|
||||
Reference in New Issue
Block a user