Kubernetes
Z Poznámkový blok
Instalace
K3S server:
sudo su - curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -
K3S server token:
cat /var/lib/rancher/k3s/server/node-token
K3S Agent:
sudo su - curl -sfL https://get.k3s.io | K3S_URL=https://IP_K3S_SERVERU:6443 K3S_TOKEN=TOKEN_K3S_SERVERU sh -
Konfigurace
kubernetes proxy:
kubectl proxy --disable-filter=true --address IP_ADDRESA
Dashboard
Kubernetes dashboard
Instalace: kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
Dashboard RBAC Configuration: dashboard.admin-user.yml
apiVersion: v1 kind: ServiceAccount metadata: name: admin-user namespace: kubernetes-dashboard
dashboard.admin-user-role.yml
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
sudo k3s kubectl create -f dashboard.admin-user.yml -f dashboard.admin-user-role.yml
sudo k3s kubectl -n kubernetes-dashboard create token admin-user
sudo k3s kubectl delete ns kubernetes-dashboard