salt.states.k8s

Manage Kubernetes

2016.3.0 新版功能.

kube_label_1:
  k8s.label_present:
    - name: mylabel
    - value: myvalue
    - node: myothernodename
    - apiserver: http://mykubeapiserer:8080

kube_label_2:
  k8s.label_absent:
    - name: mylabel
    - node: myothernodename
    - apiserver: http://mykubeapiserer:8080

kube_label_3:
  k8s.label_folder_present:
    - name: mylabel
    - node: myothernodename
    - apiserver: http://mykubeapiserer:8080
salt.states.k8s.label_absent(name, node=None, apiserver=None)

Ensure the label doesn't exist on the kube node.

name
Name of the label.
node
Override node ID.
apiserver
K8S apiserver URL.
salt.states.k8s.label_folder_absent(name, node=None, apiserver=None)

Ensure the label folder doesn't exist on the kube node.

name
Name of the label folder.
node
Override node ID.
apiserver
K8S apiserver URL.
salt.states.k8s.label_present(name, value, node=None, apiserver=None)

Ensure the label exists on the kube node.

name
Name of the label.
value
Value of the label.
node
Override node ID.
apiserver
K8S apiserver URL.