|
4 | 4 |
|
5 | 5 | ## Tools to analyse a cluster |
6 | 6 |
|
7 | | -### [**Steampipe - Kubernetes Compliance](https://github.com/turbot/steampipe-mod-kubernetes-compliance) |
| 7 | +### [Steampipe - Kubernetes Compliance](https://github.com/turbot/steampipe-mod-kubernetes-compliance) |
8 | 8 |
|
9 | 9 | It's will **several compliance checks over the Kubernetes cluster**. It includes support for CIS, National Security Agency (NSA) and Cybersecurity and Infrastructure Security Agency (CISA) Cybersecurity technical report for Kubernetes hardening. |
10 | 10 |
|
@@ -124,6 +124,62 @@ To install: |
124 | 124 | | Homebrew (macOS and Linux) | `brew install kube-score` | |
125 | 125 | | [Krew](https://krew.sigs.k8s.io/) (macOS and Linux) | `kubectl krew install score` | |
126 | 126 |
|
| 127 | +## Tools to analyze YAML files & Helm Charts |
| 128 | + |
| 129 | +### [**Kube-linter**](https://github.com/stackrox/kube-linter) |
| 130 | + |
| 131 | +```bash |
| 132 | +# Install Kube-linter |
| 133 | +brew install kube-linter |
| 134 | + |
| 135 | +# Run Kube-linter |
| 136 | +## lint ./path/to/yaml/or/chart |
| 137 | +``` |
| 138 | + |
| 139 | +### [Checkov](https://github.com/bridgecrewio/checkov) |
| 140 | + |
| 141 | +```bash |
| 142 | +# Install Checkov |
| 143 | +pip install checkov |
| 144 | + |
| 145 | +# Run Checkov |
| 146 | +checkov -d ./path/to/yaml/or/chart |
| 147 | +``` |
| 148 | + |
| 149 | +### [kube‑score](https://github.com/zegl/kube-score) |
| 150 | + |
| 151 | +```bash |
| 152 | +# Install kube-score |
| 153 | +brew install kube-score |
| 154 | + |
| 155 | +# Run kube-score |
| 156 | +kube-score score ./path/to/yaml |
| 157 | +# or |
| 158 | +helm template chart /path/to/chart | kube-score score - |
| 159 | +# or if the chart needs some values |
| 160 | +helm template chart /path/to/chart \ |
| 161 | + --set 'config.urls[0]=https://dummy.backend.internal' \ |
| 162 | + | kube-score score - |
| 163 | +``` |
| 164 | + |
| 165 | +### [Kubesec](https://github.com/controlplaneio/kubesec) |
| 166 | + |
| 167 | +```bash |
| 168 | +# Install Kubesec |
| 169 | +## Download from https://github.com/controlplaneio/kubesec/releases |
| 170 | + |
| 171 | +# Run Kubesec in a yaml |
| 172 | +kubesec scan ./path/to/yaml |
| 173 | +# or |
| 174 | +helm template chart /path/to/chart | kubesec scan - |
| 175 | +# or if the chart needs some values |
| 176 | +helm template chart /path/to/chart \ |
| 177 | + --set 'config.urls[0]=https://dummy.backend.internal' \ |
| 178 | + | kubesec scan - |
| 179 | +``` |
| 180 | + |
| 181 | + |
| 182 | + |
127 | 183 | ## Tips |
128 | 184 |
|
129 | 185 | ### Kubernetes PodSecurityContext and SecurityContext |
|
0 commit comments