- Rebuild manifests/doormile/miletruth.yaml (was corrupted since the initial commit - contained pasted AI/terminal output, truncated env var names/values, duplicate keys). Rebuilt from the confirmed-live config, secrets sourced via a Secret instead of plaintext values. - Lock down the Kubernetes Dashboard: remove --enable-skip-login / --enable-insecure-login / --insecure-port=9090, remove the extra cluster-admin binding on the dashboard's own ServiceAccount, remove the now-dead insecure NodePort Service. Token-based login via the existing admin-user ServiceAccount is unaffected. - Fix the duplicate `backendRefs` key under the same HTTPRoute rule in alaska.yaml (invalid/redundant YAML). - Delete 6 redundant duplicate manifests (fiesta-sts/svc, atlantis-sts/svc, jupiter-sts/svc) that were partial, stale subsets of nearle-fiesta/atlantis/jupiter.yaml - one pair disagreed on the fiesta image tag entirely (v1.3.50 vs v1.3.67, neither of which matched what's actually live). - Reconcile nearle-fiesta.yaml and nearle-jupiter.yaml image tags to the confirmed-live versions (v1.3.78 / v2.7.55). - Add allowPrivilegeEscalation:false + drop-all-capabilities to fiesta/atlantis/jupiter/titan/ariane and the 5 specialized core workers, which previously ran with no securityContext at all. - Add terminationGracePeriodSeconds:45 to the worker StatefulSets so Kubernetes gives the new graceful-shutdown drain (see worker.py changes) enough time before SIGKILL.
290 lines
6.7 KiB
YAML
290 lines
6.7 KiB
YAML
# Kubernetes Dashboard - Official Web UI
|
|
# Deploy with: kubectl apply -f manifests/alaska/k8s-dashboard.yaml
|
|
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: kubernetes-dashboard
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: admin-user
|
|
namespace: kubernetes-dashboard
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: admin-user
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: cluster-admin
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: admin-user
|
|
namespace: kubernetes-dashboard
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: admin-user
|
|
namespace: kubernetes-dashboard
|
|
annotations:
|
|
kubernetes.io/service-account.name: "admin-user"
|
|
type: kubernetes.io/service-account-token
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: kubernetes-dashboard
|
|
namespace: kubernetes-dashboard
|
|
labels:
|
|
k8s-app: kubernetes-dashboard
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
k8s-app: kubernetes-dashboard
|
|
template:
|
|
metadata:
|
|
labels:
|
|
k8s-app: kubernetes-dashboard
|
|
spec:
|
|
containers:
|
|
- name: kubernetes-dashboard
|
|
image: kubernetesui/dashboard:v2.7.0
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8443
|
|
protocol: TCP
|
|
args:
|
|
- --auto-generate-certificates
|
|
- --namespace=kubernetes-dashboard
|
|
volumeMounts:
|
|
- name: kubernetes-dashboard-certs
|
|
mountPath: /certs
|
|
- name: tmp-volume
|
|
mountPath: /tmp
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
runAsUser: 1001
|
|
runAsGroup: 2001
|
|
livenessProbe:
|
|
httpGet:
|
|
scheme: HTTPS
|
|
path: /
|
|
port: 8443
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 30
|
|
periodSeconds: 10
|
|
failureThreshold: 3
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
volumes:
|
|
- name: kubernetes-dashboard-certs
|
|
secret:
|
|
secretName: kubernetes-dashboard-certs
|
|
- name: tmp-volume
|
|
emptyDir: {}
|
|
serviceAccountName: kubernetes-dashboard
|
|
nodeSelector:
|
|
"kubernetes.io/os": linux
|
|
tolerations:
|
|
- key: node-role.kubernetes.io/master
|
|
operator: Exists
|
|
effect: NoSchedule
|
|
- key: node-role.kubernetes.io/control-plane
|
|
operator: Exists
|
|
effect: NoSchedule
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: kubernetes-dashboard
|
|
namespace: kubernetes-dashboard
|
|
labels:
|
|
k8s-app: kubernetes-dashboard
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 443
|
|
targetPort: 8443
|
|
protocol: TCP
|
|
name: https
|
|
selector:
|
|
k8s-app: kubernetes-dashboard
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: kubernetes-dashboard
|
|
namespace: kubernetes-dashboard
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: kubernetes-dashboard
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["*"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: ["apps"]
|
|
resources: ["*"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: ["networking.k8s.io"]
|
|
resources: ["*"]
|
|
verbs: ["get", "list", "watch"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: kubernetes-dashboard
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: kubernetes-dashboard
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: kubernetes-dashboard
|
|
namespace: kubernetes-dashboard
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: kubernetes-dashboard-secrets
|
|
namespace: kubernetes-dashboard
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["secrets"]
|
|
verbs: ["get", "update", "create"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: kubernetes-dashboard-secrets
|
|
namespace: kubernetes-dashboard
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: kubernetes-dashboard-secrets
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: kubernetes-dashboard
|
|
namespace: kubernetes-dashboard
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: kubernetes-dashboard-certs
|
|
namespace: kubernetes-dashboard
|
|
type: Opaque
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: kubernetes-dashboard-csrf
|
|
namespace: kubernetes-dashboard
|
|
type: Opaque
|
|
data:
|
|
csrf: "" # Will be auto-generated by dashboard
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: dashboard-proxy-config
|
|
namespace: kubernetes-dashboard
|
|
data:
|
|
nginx.conf: |
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
http {
|
|
upstream k8s_dashboard {
|
|
server kubernetes-dashboard:443;
|
|
}
|
|
server {
|
|
listen 8083;
|
|
server_name _;
|
|
location / {
|
|
proxy_pass https://k8s_dashboard;
|
|
proxy_ssl_verify off;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_connect_timeout 60s;
|
|
proxy_send_timeout 60s;
|
|
proxy_read_timeout 60s;
|
|
}
|
|
}
|
|
}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: dashboard-proxy
|
|
namespace: kubernetes-dashboard
|
|
labels:
|
|
app.kubernetes.io/name: dashboard-proxy
|
|
app.kubernetes.io/part-of: kubernetes-dashboard
|
|
spec:
|
|
serviceName: "dashboard-proxy"
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: dashboard-proxy
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: dashboard-proxy
|
|
app.kubernetes.io/part-of: kubernetes-dashboard
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx:alpine
|
|
ports:
|
|
- containerPort: 8083
|
|
volumeMounts:
|
|
- name: nginx-config
|
|
mountPath: /etc/nginx/nginx.conf
|
|
subPath: nginx.conf
|
|
resources:
|
|
requests:
|
|
memory: "64Mi"
|
|
cpu: "50m"
|
|
limits:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
volumes:
|
|
- name: nginx-config
|
|
configMap:
|
|
name: dashboard-proxy-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: dashboard-proxy
|
|
namespace: kubernetes-dashboard
|
|
labels:
|
|
app.kubernetes.io/name: dashboard-proxy
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app.kubernetes.io/name: dashboard-proxy
|
|
ports:
|
|
- port: 8083
|
|
targetPort: 8083
|
|
nodePort: 30826
|
|
protocol: TCP
|