新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: todo-web
|
||||
namespace: kiamol-ch17
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: todo-web
|
||||
namespace: kiamol-ch17
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: todo-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: todo-web
|
||||
spec:
|
||||
serviceAccountName: todo-web
|
||||
initContainers:
|
||||
- name: configurator
|
||||
image: kiamol/ch17-todo-list-configurator
|
||||
volumeMounts:
|
||||
- name: shared
|
||||
mountPath: "/config-out"
|
||||
readOnly: false
|
||||
containers:
|
||||
- name: web
|
||||
image: kiamol/ch04-todo-list
|
||||
volumeMounts:
|
||||
- name: shared
|
||||
mountPath: "/app/config"
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: shared
|
||||
emptyDir: {}
|
||||
@@ -0,0 +1,26 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: ch17-reader
|
||||
labels:
|
||||
kiamol: ch17
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces"]
|
||||
resourceNames: ["kiamol-ch17"]
|
||||
verbs: ["get"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: todo-web-reader
|
||||
labels:
|
||||
kiamol: ch17
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: todo-web
|
||||
namespace: kiamol-ch17
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: ch17-reader
|
||||
@@ -0,0 +1,38 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: todo-web
|
||||
namespace: kiamol-ch17
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: todo-web
|
||||
namespace: kiamol-ch17
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: todo-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: todo-web
|
||||
spec:
|
||||
serviceAccountName: todo-web
|
||||
initContainers:
|
||||
- name: configurator
|
||||
image: kiamol/ch17-todo-list-configurator
|
||||
volumeMounts:
|
||||
- name: shared
|
||||
mountPath: "/config-out"
|
||||
readOnly: false
|
||||
containers:
|
||||
- name: web
|
||||
image: kiamol/ch04-todo-list
|
||||
volumeMounts:
|
||||
- name: shared
|
||||
mountPath: "/app/config"
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: shared
|
||||
emptyDir: {}
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: todo-web
|
||||
namespace: kiamol-ch17
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 8020
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: todo-web
|
||||
Reference in New Issue
Block a user