31 lines
935 B
YAML
31 lines
935 B
YAML
id: kubernetes-code-env
|
|
info:
|
|
name: Kubernetes Cluster Validation
|
|
author: princechaddha
|
|
severity: info
|
|
description: |
|
|
Checks if kubernetes CLI is set up and all necessary tools are installed on the environment.
|
|
reference:
|
|
- https://kubernetes.io/
|
|
tags: cloud,devops,kubernetes,k8s,kubernetes-cloud-config
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
kubectl version
|
|
|
|
extractors:
|
|
- type: regex
|
|
internal: true
|
|
name: server_version
|
|
group: 1
|
|
regex:
|
|
- 'Server Version:\s*(v[0-9]+\.[0-9]+\.[0-9]+)'
|
|
|
|
- type: dsl
|
|
dsl:
|
|
- '"kubectl is successfully connected to the Kubernetes API Server Version: " + server_version'
|
|
# digest: 4a0a004730450220619359f90501cb0301a0a76aea235c33bf0d89d0295b92f754fedbadae743cad02210081662171da38b9b6cbeee60e25edb542f288457118bde3833e2ea4e784333f18:366f2a24c8eb519f6968bd8801c08ebe |