Kubernetes Cluster in Proxmox VE (AlmaLinux/CentOS): Unterschied zwischen den Versionen

Zur Navigation springen Zur Suche springen
K
KKeine Bearbeitungszusammenfassung
Zeile 182: Zeile 182:
<nowiki>#</nowiki> Dashboard installieren<syntaxhighlight lang="bash">
<nowiki>#</nowiki> Dashboard installieren<syntaxhighlight lang="bash">
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.1/aio/deploy/recommended.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.1/aio/deploy/recommended.yaml
</syntaxhighlight><nowiki>#</nowiki> Zugriff von LAN / <nowiki>https://www.thegeekdiary.com/how-to-access-kubernetes-dashboard-externally/</nowiki><syntaxhighlight lang="bash">
</syntaxhighlight><nowiki>#</nowiki> Zugriff von LAN / <nowiki>https://www.thegeekdiary.com/how-to-access-kubernetes-dashboard-externally/</nowiki>
 
Den Dashboard Service editieren:<syntaxhighlight lang="bash">
kubectl -n kubernetes-dashboard edit service kubernetes-dashboard
kubectl -n kubernetes-dashboard edit service kubernetes-dashboard
</syntaxhighlight>type: NodePort                   ### clusterIP to NodePort
</syntaxhighlight>Den Parameter <code>type: ClusterIP</code> in '''NodePort''' ändern:<syntaxhighlight lang="bash">
 
apiVersion: v1
<nowiki>#</nowiki> Create admin-user
kind: Service
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"k8s-app":"kubernetes-dashboard"},"name":"kubernetes-dashboard","namespace":"kubernetes-dashboard"},"spec":{"ports":[{"port":443,"targetPort":8443}],"selector":{"k8s-app":"kubernetes-dashboard"}}}
  creationTimestamp: "2022-12-14T23:09:44Z"
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kubernetes-dashboard
  resourceVersion: "23315"
  uid: 5011d061-dce0-4e4e-a245-3de3eac0a77c
spec:
  clusterIP: 10.109.124.10
  clusterIPs:
  - 10.109.124.10
  externalTrafficPolicy: Cluster
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - nodePort: 31293
    port: 443
    protocol: TCP
    targetPort: 8443
  selector:
    k8s-app: kubernetes-dashboard
  sessionAffinity: None
  type: ClusterIP # Ändern in NodePort
status:
  loadBalancer: {}
</syntaxhighlight><nowiki>#</nowiki> Create admin-user


<nowiki>https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md</nowiki>
<nowiki>https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md</nowiki>

Navigationsmenü