💥 add all the files
This commit is contained in:
@@ -0,0 +1,81 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: portainer
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: portainer-sa-clusteradmin
|
||||||
|
namespace: portainer
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: portainer-crb-clusteradmin
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: cluster-admin
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: portainer-sa-clusteradmin
|
||||||
|
namespace: portainer
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: portainer-agent
|
||||||
|
namespace: portainer
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
app: portainer-agent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
protocol: TCP
|
||||||
|
port: 9001
|
||||||
|
targetPort: 9001
|
||||||
|
nodePort: 30778
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: portainer-agent-headless
|
||||||
|
namespace: portainer
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
app: portainer-agent
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: portainer-agent
|
||||||
|
namespace: portainer
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: portainer-agent
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: portainer-agent
|
||||||
|
spec:
|
||||||
|
serviceAccountName: portainer-sa-clusteradmin
|
||||||
|
containers:
|
||||||
|
- name: portainer-agent
|
||||||
|
image: portainer/agent:2.19.4
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value: DEBUG
|
||||||
|
- name: AGENT_CLUSTER_ADDR
|
||||||
|
value: "portainer-agent-headless"
|
||||||
|
- name: KUBERNETES_POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
|
ports:
|
||||||
|
- containerPort: 9001
|
||||||
|
protocol: TCP
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: portainer
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: portainer
|
||||||
|
namespace: portainer
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: portainer
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: portainer
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: portainer/portainer-ce:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: portainer
|
||||||
|
ports:
|
||||||
|
- containerPort: 9000
|
||||||
|
name: portainer-port
|
||||||
|
volumeMounts:
|
||||||
|
- name: portainer-config
|
||||||
|
mountPath: /data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: portainer-config
|
||||||
|
hostPath:
|
||||||
|
path: /opt/kubernetes/portainer_kube/config/
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: portainer
|
||||||
|
namespace: portainer
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: portainer-port
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
app: portainer
|
||||||
Reference in New Issue
Block a user