This commit is contained in:
2024-02-20 17:15:27 +08:00
committed by huty
parent 6706e1a633
commit 34158042ad
1529 changed files with 177765 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: kiamol-ch17-lab
labels:
kiamol: ch17-lab

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-explorer-lab
namespace: kiamol-ch17-lab
automountServiceAccountToken: false

View File

@@ -0,0 +1,26 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: default-pod-reader-lab
labels:
kiamol: ch17-lab
rules:
- apiGroups: [""] #core
resources: ["pods"]
verbs: ["get", "list", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kube-explorer-lab-pods-default
namespace: default
labels:
kiamol: ch17-lab
subjects:
- kind: ServiceAccount
name: kube-explorer-lab
namespace: kiamol-ch17-lab
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: default-pod-reader-lab

View File

@@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kube-explorer
namespace: kiamol-ch17-lab
spec:
selector:
matchLabels:
app: kube-explorer
template:
metadata:
labels:
app: kube-explorer
spec:
serviceAccountName: kube-explorer-lab
automountServiceAccountToken: true
containers:
- image: kiamol/ch17-kube-explorer
name: web
ports:
- containerPort: 80
name: http
env:
- name: ASPNETCORE_ENVIRONMENT
value: Development

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: kube-explorer
namespace: kiamol-ch17-lab
spec:
ports:
- port: 8022
targetPort: http
selector:
app: kube-explorer
type: LoadBalancer