/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Administration/Server/Orchestration/openshift/kubernetes.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2017-04-03 02:45:17 UTC
  • Revision ID: csa@suren.me-20170403024517-dwzj0z0k1cmhxm7u
Restructuring, OpenShift, Ansible, Git

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
OpenShift does not provide a full interface to kubernets. Some advanced actions are only possible if kubernetes is configured 
 
2
directly (which is fully OK).
 
3
 
 
4
    kubectl cluster-info                                        - Get infromation about Kubernets master
 
5
 
 
6
 
 
7
 
 
8
 
 
9
Configuring Afinity
 
10
===================
 
11
* Not tested...
 
12
 
 
13
 
 
14
template:
 
15
    metadata:
 
16
      annotations:
 
17
        scheduler.alpha.kubernetes.io/affinity: |
 
18
          {
 
19
            "podAntiAffinity": {                                                        - nodeAffinity, podAffinity, nodeAntiAffinity, podAntiAffinity
 
20
              "requiredDuringSchedulingIgnoredDuringExecution": [{                      - preferredDuringSchedulingIgnoredDuringExecution
 
21
                "labelSelector": {                                                      - labelSelector (for pods) and nodeSelectorTerms (nodes)
 
22
                  "matchExpressions": [{
 
23
                    "key": "docker-registry",
 
24
                    "operator": "In",
 
25
                    "values":["default"]
 
26
                  }]
 
27
                },
 
28
                "topologyKey": "kubernetes.io/hostname"
 
29
              }]
 
30
            }
 
31
          }
 
32
 
 
33
template:
 
34
 
 
35
Seems not working [not important now].
 
36
    metadata:
 
37
      annotations:
 
38
        scheduler.alpha.kubernetes.io/affinity: >
 
39
          {
 
40
            "nodeAffinity": {
 
41
              "preferredDuringSchedulingIgnoredDuringExecution": {
 
42
                "labelSelector": [{
 
43
                  "matchExpressions": [{
 
44
                    "key": "master",
 
45
                    "operator": "In",
 
46
                    "values":["0"]
 
47
                  }]
 
48
                }]
 
49
              }
 
50
            }
 
51
          }
 
52