Kubernetes utils
July 11, 2023
Fairwinds. Polaris
Данное ПО создано для анализа имеющихся ресурсов в кластере на предмет уязвимостей.
helm repo add fairwinds-stable https://charts.fairwinds.com/stable helm upgrade --install polaris fairwinds-stable/polaris --namespace polaris --create-namespace # Быстрый вариант подключения через port-forward kubectl port-forward --namespace polaris svc/polaris-dashboard 8080:80
kubectl describe svc polaris-dashboard -n polaris Name: polaris-dashboard Namespace: polaris Labels: app=polaris app.kubernetes.io/component=dashboard app.kubernetes.io/instance=polaris app.kubernetes.io/managed-by=Helm app.kubernetes.io/name=polaris app.kubernetes.io/part-of=polaris app.kubernetes.io/version=5.10.3 helm.sh/chart=polaris-5.10.3 Annotations: meta.helm.sh/release-name: polaris meta.helm.sh/release-namespace: polaris Selector: app.kubernetes.io/instance=polaris,app.kubernetes.io/name=polaris,app=polaris,component=dashboard Type: ClusterIP IP Family Policy: SingleStack IP Families: IPv4 IP: 10.21.28.186 IPs: 10.21.28.186 Port: http-dashboard 80/TCP TargetPort: 8080/TCP Endpoints: 10.20.6.233:8080,10.20.7.86:8080 Session Affinity: None Events: <none>
cat <<EOF | kubectl apply -f - apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: polaris namespace: polaris annotations: kubernetes.io/ingress.class: "nginx" spec: rules: - host: polaris.prod.cameda1.tk http: paths: - path: / pathType: Prefix backend: service: name: polaris-dashboard port: number: 8080 EOF
Полезные ссылки.
Установка в режиме дашборда: https://polaris.docs.fairwinds.com/dashboard/
Кратко про Polaris: https://github.com/FairwindsOps/polaris/tree/master