File: apply_from_single_file.py

package info (click to toggle)
python-kubernetes 30.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 39,980 kB
  • sloc: python: 126,462; sh: 699; makefile: 46
file content (10 lines) | stat: -rw-r--r-- 284 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
from kubernetes import client, config, utils

def main():
    config.load_kube_config()
    k8s_client = client.ApiClient()
    yaml_file = 'examples/yaml_dir/configmap-demo-pod.yml'
    utils.create_from_yaml(k8s_client,yaml_file,verbose=True)

if __name__ == "__main__":
    main()