This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import yaml | |
def check_kubectl_compatibility_yaml(): | |
"""Checks compatibility between kubectl client and server versions using YAML output.""" | |
version_output = subprocess.check_output(["kubectl", "version", "--output=yaml"]).decode("utf-8") | |
version_data = yaml.safe_load(version_output) |