File: apply_from_single_file.py

package info (click to toggle)
python-kubernetes 35.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 47,168 kB
  • sloc: python: 145,021; sh: 763; makefile: 46
file content (10 lines) | stat: -rw-r--r-- 284 bytes parent folder | download | duplicates (3)
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()