Skip to content

Instantly share code, notes, and snippets.

@dwdraju
Last active January 8, 2019 09:57
Show Gist options
  • Save dwdraju/4e07f49cd1c8fccde94744784792ebe6 to your computer and use it in GitHub Desktop.
Save dwdraju/4e07f49cd1c8fccde94744784792ebe6 to your computer and use it in GitHub Desktop.
Kubernetes Istio update annotation, swagger
kubectl -n default patch deployment nginx-deployment -p '{"spec":{"template":{"metadata":{"annotations":{"sidecar.istio.io/inject": "true"}}}}}'
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: sleep
      annotations:
        sidecar.istio.io/inject: "true"
    spec:
      containers:
      - name: sleep
        image: tutum/curl
        command: ["/bin/sleep","infinity"]
        imagePullPolicy: IfNotPresent
  http:
  - match:
    - uri:
        prefix: "/swagger"
    - uri:
        prefix: "/swagger/"
    rewrite:
      uri: "/"
    route:
    - destination:
        host: dev-swaggerui
        port:
          number: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment