Advertisement
krak3n

linkerd kubernetes config

Oct 4th, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.17 KB | None | 0 0
  1. #
  2. # Linkerd Service Mesh
  3. # Runs linkerd in a daemonset, in linker-to-linker mode, using namerd to route
  4. #
  5. ---
  6. # Configuration - Route to namerd
  7. apiVersion: v1
  8. kind: ConfigMap
  9. metadata:
  10.   name: l5d-config
  11. data:
  12.   config.yaml: |-
  13.     admin:
  14.       ip: 0.0.0.0
  15.       port: 9990
  16.     telemetry:
  17.     - kind: io.l5d.prometheus
  18.     - kind: io.l5d.recentRequests
  19.       sampleRate: 0.25 # TODO: tune
  20.     usage:
  21.       orgId: flite-linkerd
  22.     routers: # TODO: Add HTTP/2 & GRPC
  23.  
  24.     - protocol: http
  25.       label: http-outgoing
  26.       interpreter:
  27.         kind: io.l5d.namerd
  28.         dst: /$/inet/namerd.default.svc.cluster.local/4100
  29.         namespace: http-outgoing
  30.         transformers:
  31.         - kind: io.l5d.k8s.daemonset
  32.           namespace: default
  33.           port: http-outgoing
  34.           service: l5d
  35.       servers:
  36.       - port: 4140
  37.         ip: 0.0.0.0
  38.       service:
  39.         responseClassifier:
  40.           kind: io.l5d.http.retryableRead5XX
  41.  
  42.     - protocol: http
  43.       label: http-incoming
  44.       interpreter:
  45.         kind: io.l5d.namerd
  46.         dst: /$/inet/namerd.default.svc.cluster.local/4100
  47.         namespace: http-incoming
  48.         transformers:
  49.         - kind: io.l5d.k8s.localnode
  50.       servers:
  51.       - port: 4141
  52.         ip: 0.0.0.0
  53.  
  54.     - protocol: http
  55.       label: http-external
  56.       interpreter:
  57.         kind: io.l5d.namerd
  58.         dst: /$/inet/namerd.default.svc.cluster.local/4100
  59.         namespace: http-incoming
  60.       servers:
  61.       - port: 4142
  62.         ip: 0.0.0.0
  63. ---
  64. apiVersion: extensions/v1beta1
  65. kind: DaemonSet
  66. metadata:
  67.   labels:
  68.     app: l5d
  69.   name: l5d
  70. spec:
  71.   template:
  72.     metadata:
  73.       labels:
  74.         app: l5d
  75.     spec:
  76.       volumes:
  77.       - name: l5d-config
  78.         configMap:
  79.           name: "l5d-config"
  80.       containers:
  81.      # Linkerd Container
  82.       - name: l5d
  83.         image: buoyantio/linkerd:1.2.0
  84.         env:
  85.         - name: POD_IP
  86.           valueFrom:
  87.             fieldRef:
  88.               fieldPath: status.podIP
  89.         args:
  90.        - /io.buoyant/linkerd/config/config.yaml
  91.         ports: # TODO: Add http/2 & GRPC
  92.         - name: http-outgoing
  93.           containerPort: 4140
  94.           hostPort: 4140
  95.         - name: http-incoming
  96.           containerPort: 4141
  97.         - name: external
  98.           containerPort: 4142
  99.         - name: admin
  100.           containerPort: 9990
  101.         volumeMounts:
  102.         - name: "l5d-config"
  103.           mountPath: "/io.buoyant/linkerd/config"
  104.           readOnly: true
  105.         resources:
  106.           limits:
  107.             cpu: 500m
  108.             memory: 512Mi
  109.           requests:
  110.             cpu: 0
  111.             memory: 512Mi
  112.       # Run kubectl as a sidecar
  113.       - name: kubectl
  114.         image: buoyantio/kubectl:v1.4.0
  115.         args:
  116.        - "proxy"
  117.         - "-p"
  118.         - "8001"
  119.         resources:
  120.           requests:
  121.             cpu: 0
  122.             memory: 32Mi
  123. ---
  124. apiVersion: v1
  125. kind: Service
  126. metadata:
  127.   name: l5d
  128. spec:
  129.   selector:
  130.     app: l5d
  131.   type: ClusterIP
  132.   ports:
  133.   - name: external
  134.     port: 80
  135.     targetPort: 4142
  136.   - name: http-outgoing
  137.     port: 4140
  138.   - name: http-incoming
  139.     port: 4141
  140.   - name: admin
  141.     port: 9990
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement