Deploy Headlamp internally at headlamp.local
Add headlamp/headlamp.yaml (Deployment v0.42.0, cluster-admin ServiceAccount + login token, Service, Traefik ingress). Remove the stray root headlamp-ingress.yaml that referenced a non-existent service. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
eeb79232c2
commit
b037f5acf7
2 changed files with 111 additions and 18 deletions
|
|
@ -1,18 +0,0 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: headlamp
|
||||
namespace: kube-system
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: headlamp.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: headlamp
|
||||
port:
|
||||
number: 80
|
||||
111
headlamp/headlamp.yaml
Normal file
111
headlamp/headlamp.yaml
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: headlamp-admin
|
||||
namespace: kube-system
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: headlamp-admin
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: cluster-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: headlamp-admin
|
||||
namespace: kube-system
|
||||
---
|
||||
# Long-lived token used to log in to the Headlamp UI.
|
||||
# Retrieve with: kubectl -n kube-system get secret headlamp-admin -o jsonpath='{.data.token}' | base64 -d
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: headlamp-admin
|
||||
namespace: kube-system
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: headlamp-admin
|
||||
type: kubernetes.io/service-account-token
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: headlamp
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: headlamp
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: headlamp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: headlamp
|
||||
spec:
|
||||
serviceAccountName: headlamp-admin
|
||||
containers:
|
||||
- name: headlamp
|
||||
image: ghcr.io/headlamp-k8s/headlamp:v0.42.0
|
||||
args:
|
||||
- "-in-cluster"
|
||||
- "-plugins-dir=/headlamp/plugins"
|
||||
ports:
|
||||
- containerPort: 4466
|
||||
name: http
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 4466
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 4466
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 30
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 100
|
||||
privileged: false
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: headlamp
|
||||
namespace: kube-system
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: headlamp
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 4466
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: headlamp
|
||||
namespace: kube-system
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: headlamp.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: headlamp
|
||||
port:
|
||||
number: 80
|
||||
Loading…
Add table
Add a link
Reference in a new issue