diff --git a/deploy/upgrade/index.html b/deploy/upgrade/index.html index e676dca3a..6000a4568 100644 --- a/deploy/upgrade/index.html +++ b/deploy/upgrade/index.html @@ -1145,7 +1145,7 @@ in the controller Deployment.

simply change the 0.9.0 tag to the version you wish to upgrade to. The easiest way to do this is e.g. (do note you may need to change the name parameter according to your installation):

kubectl set image deployment/nginx-ingress-controller \
-  nginx-ingress-controller=nginx:quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.15.0
+  nginx-ingress-controller=nginx:quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.16.1
 
diff --git a/examples/customization/configuration-snippets/ingress.yaml b/examples/customization/configuration-snippets/ingress.yaml index 87ce21db2..01af93ea2 100644 --- a/examples/customization/configuration-snippets/ingress.yaml +++ b/examples/customization/configuration-snippets/ingress.yaml @@ -5,7 +5,6 @@ metadata: annotations: nginx.ingress.kubernetes.io/configuration-snippet: | more_set_headers "Request-Id: $req_id"; - spec: rules: - host: custom.configuration.com diff --git a/examples/static-ip/nginx-ingress-controller.yaml b/examples/static-ip/nginx-ingress-controller.yaml index d773e1a72..add5e3b2a 100644 --- a/examples/static-ip/nginx-ingress-controller.yaml +++ b/examples/static-ip/nginx-ingress-controller.yaml @@ -21,7 +21,7 @@ spec: # hostNetwork: true terminationGracePeriodSeconds: 60 containers: - - image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.15.0 + - image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.16.1 name: nginx-ingress-controller readinessProbe: httpGet: diff --git a/images/jaeger-demo.png b/images/jaeger-demo.png new file mode 100644 index 000000000..3a3e31536 Binary files /dev/null and b/images/jaeger-demo.png differ diff --git a/search/search_index.json b/search/search_index.json index 3c4331a09..eec490382 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -142,7 +142,7 @@ }, { "location": "/deploy/upgrade/", - "text": "Upgrading\n\u00b6\n\n\n\n\nImportant\n\n\nNo matter the method you use for upgrading, \nif you use template overrides,\nmake sure your templates are compatible with the new version of ingress-nginx\n.\n\n\n\n\nWithout Helm\n\u00b6\n\n\nTo upgrade your ingress-nginx installation, it should be enough to change the version of the image\nin the controller Deployment.\n\n\nI.e. if your deployment resource looks like (partial example):\n\n\nkind\n:\n \nDeployment\n\n\nmetadata\n:\n\n \nname\n:\n \nnginx-ingress-controller\n\n \nnamespace\n:\n \ningress-nginx\n\n\nspec\n:\n\n \nreplicas\n:\n \n1\n\n \nselector\n:\n \n...\n\n \ntemplate\n:\n\n \nmetadata\n:\n \n...\n\n \nspec\n:\n\n \ncontainers\n:\n\n \n-\n \nname\n:\n \nnginx-ingress-controller\n\n \nimage\n:\n \nquay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0\n\n \nargs\n:\n \n...\n\n\n\n\n\n\nsimply change the \n0.9.0\n tag to the version you wish to upgrade to.\nThe easiest way to do this is e.g. (do note you may need to change the name parameter according to your installation):\n\n\nkubectl set image deployment/nginx-ingress-controller \\\n nginx-ingress-controller=nginx:quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.15.0\n\n\n\n\n\nFor interactive editing, use \nkubectl edit deployment nginx-ingress-controller\n.\n\n\nWith Helm\n\u00b6\n\n\nIf you installed ingress-nginx using the Helm command in the deployment docs so its name is \nngx-ingress\n,\nyou should be able to upgrade using\n\n\nhelm upgrade --reuse-values ngx-ingress stable/nginx-ingress", + "text": "Upgrading\n\u00b6\n\n\n\n\nImportant\n\n\nNo matter the method you use for upgrading, \nif you use template overrides,\nmake sure your templates are compatible with the new version of ingress-nginx\n.\n\n\n\n\nWithout Helm\n\u00b6\n\n\nTo upgrade your ingress-nginx installation, it should be enough to change the version of the image\nin the controller Deployment.\n\n\nI.e. if your deployment resource looks like (partial example):\n\n\nkind\n:\n \nDeployment\n\n\nmetadata\n:\n\n \nname\n:\n \nnginx-ingress-controller\n\n \nnamespace\n:\n \ningress-nginx\n\n\nspec\n:\n\n \nreplicas\n:\n \n1\n\n \nselector\n:\n \n...\n\n \ntemplate\n:\n\n \nmetadata\n:\n \n...\n\n \nspec\n:\n\n \ncontainers\n:\n\n \n-\n \nname\n:\n \nnginx-ingress-controller\n\n \nimage\n:\n \nquay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0\n\n \nargs\n:\n \n...\n\n\n\n\n\n\nsimply change the \n0.9.0\n tag to the version you wish to upgrade to.\nThe easiest way to do this is e.g. (do note you may need to change the name parameter according to your installation):\n\n\nkubectl set image deployment/nginx-ingress-controller \\\n nginx-ingress-controller=nginx:quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.16.1\n\n\n\n\n\nFor interactive editing, use \nkubectl edit deployment nginx-ingress-controller\n.\n\n\nWith Helm\n\u00b6\n\n\nIf you installed ingress-nginx using the Helm command in the deployment docs so its name is \nngx-ingress\n,\nyou should be able to upgrade using\n\n\nhelm upgrade --reuse-values ngx-ingress stable/nginx-ingress", "title": "Upgrading" }, { @@ -152,7 +152,7 @@ }, { "location": "/deploy/upgrade/#without-helm", - "text": "To upgrade your ingress-nginx installation, it should be enough to change the version of the image\nin the controller Deployment. I.e. if your deployment resource looks like (partial example): kind : Deployment metadata : \n name : nginx-ingress-controller \n namespace : ingress-nginx spec : \n replicas : 1 \n selector : ... \n template : \n metadata : ... \n spec : \n containers : \n - name : nginx-ingress-controller \n image : quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0 \n args : ... simply change the 0.9.0 tag to the version you wish to upgrade to.\nThe easiest way to do this is e.g. (do note you may need to change the name parameter according to your installation): kubectl set image deployment/nginx-ingress-controller \\\n nginx-ingress-controller=nginx:quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.15.0 For interactive editing, use kubectl edit deployment nginx-ingress-controller .", + "text": "To upgrade your ingress-nginx installation, it should be enough to change the version of the image\nin the controller Deployment. I.e. if your deployment resource looks like (partial example): kind : Deployment metadata : \n name : nginx-ingress-controller \n namespace : ingress-nginx spec : \n replicas : 1 \n selector : ... \n template : \n metadata : ... \n spec : \n containers : \n - name : nginx-ingress-controller \n image : quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0 \n args : ... simply change the 0.9.0 tag to the version you wish to upgrade to.\nThe easiest way to do this is e.g. (do note you may need to change the name parameter according to your installation): kubectl set image deployment/nginx-ingress-controller \\\n nginx-ingress-controller=nginx:quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.16.1 For interactive editing, use kubectl edit deployment nginx-ingress-controller .", "title": "Without Helm" }, { @@ -1132,14 +1132,44 @@ }, { "location": "/user-guide/third-party-addons/opentracing/", - "text": "OpenTracing\n\u00b6\n\n\nUsing the third party module \nopentracing-contrib/nginx-opentracing\n the NGINX ingress controller can configure NGINX to enable \nOpenTracing\n instrumentation.\nBy default this feature is disabled.\n\n\nTo enable the instrumentation we just need to enable the instrumentation in the configuration configmap and set the host where we should send the traces.\n\n\nIn the \nrnburn/zipkin-date-server\n\ngithub repository is an example of a dockerized date service. To install the example and zipkin collector run:\n\n\nkubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/zipkin.yaml\nkubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/deployment.yaml\n\n\n\n\n\nAlso we need to configure the NGINX controller configmap with the required values:\n\n\n$ \necho\n \n'\n\n\napiVersion: v1\n\n\nkind: ConfigMap\n\n\ndata:\n\n\n enable-opentracing: \"true\"\n\n\n zipkin-collector-host: zipkin.default.svc.cluster.local\n\n\nmetadata:\n\n\n name: nginx-configuration\n\n\n namespace: ingress-nginx\n\n\n labels:\n\n\n app: ingress-nginx\n\n\n'\n \n|\n kubectl replace -f -\n\n\n\n\n\nUsing curl we can generate some traces:\n\n\n$\n curl -v http://\n$(\nminikube ip\n)\n\n\n$\n curl -v http://\n$(\nminikube ip\n)\n\n\n\n\n\n\nIn the zipkin interface we can see the details:", + "text": "OpenTracing\n\u00b6\n\n\nEnables requests served by nginx for distributed tracing via The OpenTracing Project.\n\n\nUsing the third party module \nopentracing-contrib/nginx-opentracing\n the NGINX ingress controller can configure NGINX to enable \nOpenTracing\n instrumentation.\nBy default this feature is disabled.\n\n\nUsage\n\u00b6\n\n\nTo enable the instrumentation we must enable opentracing in the configuration configmap:\n\n\ndata\n:\n\n \nenable\n-\nopentracing\n:\n \n\"true\"\n\n\n\n\n\n\nWe must also set the host to use when uploading traces:\n\n\nzipkin-collector-host: zipkin.default.svc.cluster.local\njaeger-collector-host: jaeger-collector.default.svc.cluster.local\n\n\n\n\n\nNext you will need to deploy a distributed tracing system which uses OpenTracing. Both \nZipkin\n and\n\nJaeger\n have been tested.\n\n\nOther optional configuration options:\n\n\n# specifies the port to use when uploading traces\nzipkin-collector-port\n\n# specifies the service name to use for any traces created, Default: nginx\nzipkin-service-name\n\n# specifies the port to use when uploading traces\njaeger-collector-port\n\n# specifies the service name to use for any traces created, Default: nginx\njaeger-service-name\n\n# specifies the sampler to be used when sampling traces.\n# The available samplers are: const, probabilistic, ratelimiting, remote, Default: const\njaeger-sampler-type\n\n# specifies the argument to be passed to the sampler constructor, Default: 1\njaeger-sampler-param\n\n\n\n\n\nExamples\n\u00b6\n\n\nThe following examples show how to deploy and test different distributed tracing systems. These example can be performed\nusing Minikube.\n\n\nZipkin\n\u00b6\n\n\nIn the \nrnburn/zipkin-date-server\n\ngithub repository is an example of a dockerized date service. To install the example and zipkin collector run:\n\n\nkubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/zipkin.yaml\nkubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/deployment.yaml\n\n\n\n\n\nAlso we need to configure the NGINX controller configmap with the required values:\n\n\n$ \necho\n \n'\n\n\napiVersion: v1\n\n\nkind: ConfigMap\n\n\ndata:\n\n\n enable-opentracing: \"true\"\n\n\n zipkin-collector-host: zipkin.default.svc.cluster.local\n\n\nmetadata:\n\n\n name: nginx-load-balancer-conf\n\n\n namespace: kube-system\n\n\n'\n \n|\n kubectl replace -f -\n\n\n\n\n\nIn the zipkin interface we can see the details:\n\n\n\nJaeger\n\u00b6\n\n\n\n\n\n\nEnable Ingress addon in minikube:\n \n$ minikube addons \nenable\n ingress\n\n\n\n\n\n\nAdd minikube IP to /etc/hosts:\n \n$ \necho\n \n\"\n$(\nminikube ip\n)\n example.com\"\n \n|\n sudo tee -a /etc/hosts\n\n\n\n\n\n\nApply a Basic Service and Ingress Resource:\n ```\n # Create Echoheaders Deployment\n $ kubectl run echoheaders --image=k8s.gcr.io/echoserver:1.4 --replicas=1 --port=8080\n\n\nExpose as a Cluster-IP\n\u00b6\n\n\n$ kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-x\n\n\nApply the Ingress Resource\n\u00b6\n\n\n$ echo '\n apiVersion: extensions/v1beta1\n kind: Ingress\n metadata:\n name: echo-ingress\n spec:\n rules:\n - host: example.com\n http:\n paths:\n - backend:\n serviceName: echoheaders-x\n servicePort: 80\n path: /echo\n ' | kubectl apply -f -\n```\n\n\n\n\n\n\nEnable OpenTracing and set the zipkin-collector-host:\n \n$ \necho\n \n'\n apiVersion: v1\n kind: ConfigMap\n data:\n enable-opentracing: \"true\"\n zipkin-collector-host: zipkin.default.svc.cluster.local\n jaeger-collector-host: jaeger-collector.default.svc.cluster.local\n metadata:\n name: nginx-load-balancer-conf\n namespace: kube-system\n '\n \n|\n kubectl replace -f -\n\n\n\n\n\n\nApply the Jaeger All-In-One Template:\n \n$ kubectl apply -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml\n\n\n\n\n\n\nMake a few requests to the Service:\n ```\n $ curl example.com/echo -d \"meow\"\n\n\nCLIENT VALUES:\nclient_address=172.17.0.5\ncommand=POST\nreal path=/echo\nquery=nil\nrequest_version=1.1\nrequest_uri=http://example.com:8080/echo\n\n\nSERVER VALUES:\nserver_version=nginx: 1.10.0 - lua: 10001\n\n\nHEADERS RECEIVED:\naccept=\n/\n\nconnection=close\ncontent-length=4\ncontent-type=application/x-www-form-urlencoded\nhost=example.com\nuser-agent=curl/7.54.0\nx-forwarded-for=192.168.99.1\nx-forwarded-host=example.com\nx-forwarded-port=80\nx-forwarded-proto=http\nx-original-uri=/echo\nx-real-ip=192.168.99.1\nx-scheme=http\nBODY:\nmeow\n```\n\n\n\n\n\n\nView the Jaeger UI:\n ```\n $ minikube service jaeger-query --url\n\n\nhttp://192.168.99.100:30183\n```\n\n\nIn the jaeger interface we can see the details:", "title": "OpenTracing" }, { "location": "/user-guide/third-party-addons/opentracing/#opentracing", - "text": "Using the third party module opentracing-contrib/nginx-opentracing the NGINX ingress controller can configure NGINX to enable OpenTracing instrumentation.\nBy default this feature is disabled. To enable the instrumentation we just need to enable the instrumentation in the configuration configmap and set the host where we should send the traces. In the rnburn/zipkin-date-server \ngithub repository is an example of a dockerized date service. To install the example and zipkin collector run: kubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/zipkin.yaml\nkubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/deployment.yaml Also we need to configure the NGINX controller configmap with the required values: $ echo ' apiVersion: v1 kind: ConfigMap data: enable-opentracing: \"true\" zipkin-collector-host: zipkin.default.svc.cluster.local metadata: name: nginx-configuration namespace: ingress-nginx labels: app: ingress-nginx ' | kubectl replace -f - Using curl we can generate some traces: $ curl -v http:// $( minikube ip ) $ curl -v http:// $( minikube ip ) In the zipkin interface we can see the details:", + "text": "Enables requests served by nginx for distributed tracing via The OpenTracing Project. Using the third party module opentracing-contrib/nginx-opentracing the NGINX ingress controller can configure NGINX to enable OpenTracing instrumentation.\nBy default this feature is disabled.", "title": "OpenTracing" }, + { + "location": "/user-guide/third-party-addons/opentracing/#usage", + "text": "To enable the instrumentation we must enable opentracing in the configuration configmap: data : \n enable - opentracing : \"true\" We must also set the host to use when uploading traces: zipkin-collector-host: zipkin.default.svc.cluster.local\njaeger-collector-host: jaeger-collector.default.svc.cluster.local Next you will need to deploy a distributed tracing system which uses OpenTracing. Both Zipkin and Jaeger have been tested. Other optional configuration options: # specifies the port to use when uploading traces\nzipkin-collector-port\n\n# specifies the service name to use for any traces created, Default: nginx\nzipkin-service-name\n\n# specifies the port to use when uploading traces\njaeger-collector-port\n\n# specifies the service name to use for any traces created, Default: nginx\njaeger-service-name\n\n# specifies the sampler to be used when sampling traces.\n# The available samplers are: const, probabilistic, ratelimiting, remote, Default: const\njaeger-sampler-type\n\n# specifies the argument to be passed to the sampler constructor, Default: 1\njaeger-sampler-param", + "title": "Usage" + }, + { + "location": "/user-guide/third-party-addons/opentracing/#examples", + "text": "The following examples show how to deploy and test different distributed tracing systems. These example can be performed\nusing Minikube.", + "title": "Examples" + }, + { + "location": "/user-guide/third-party-addons/opentracing/#zipkin", + "text": "In the rnburn/zipkin-date-server \ngithub repository is an example of a dockerized date service. To install the example and zipkin collector run: kubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/zipkin.yaml\nkubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/deployment.yaml Also we need to configure the NGINX controller configmap with the required values: $ echo ' apiVersion: v1 kind: ConfigMap data: enable-opentracing: \"true\" zipkin-collector-host: zipkin.default.svc.cluster.local metadata: name: nginx-load-balancer-conf namespace: kube-system ' | kubectl replace -f - In the zipkin interface we can see the details:", + "title": "Zipkin" + }, + { + "location": "/user-guide/third-party-addons/opentracing/#jaeger", + "text": "Enable Ingress addon in minikube:\n $ minikube addons enable ingress Add minikube IP to /etc/hosts:\n $ echo \" $( minikube ip ) example.com\" | sudo tee -a /etc/hosts Apply a Basic Service and Ingress Resource:\n ```\n # Create Echoheaders Deployment\n $ kubectl run echoheaders --image=k8s.gcr.io/echoserver:1.4 --replicas=1 --port=8080", + "title": "Jaeger" + }, + { + "location": "/user-guide/third-party-addons/opentracing/#expose-as-a-cluster-ip", + "text": "$ kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-x", + "title": "Expose as a Cluster-IP" + }, + { + "location": "/user-guide/third-party-addons/opentracing/#apply-the-ingress-resource", + "text": "$ echo '\n apiVersion: extensions/v1beta1\n kind: Ingress\n metadata:\n name: echo-ingress\n spec:\n rules:\n - host: example.com\n http:\n paths:\n - backend:\n serviceName: echoheaders-x\n servicePort: 80\n path: /echo\n ' | kubectl apply -f -\n``` Enable OpenTracing and set the zipkin-collector-host:\n $ echo ' apiVersion: v1 kind: ConfigMap data: enable-opentracing: \"true\" zipkin-collector-host: zipkin.default.svc.cluster.local jaeger-collector-host: jaeger-collector.default.svc.cluster.local metadata: name: nginx-load-balancer-conf namespace: kube-system ' | kubectl replace -f - Apply the Jaeger All-In-One Template:\n $ kubectl apply -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml Make a few requests to the Service:\n ```\n $ curl example.com/echo -d \"meow\" CLIENT VALUES:\nclient_address=172.17.0.5\ncommand=POST\nreal path=/echo\nquery=nil\nrequest_version=1.1\nrequest_uri=http://example.com:8080/echo SERVER VALUES:\nserver_version=nginx: 1.10.0 - lua: 10001 HEADERS RECEIVED:\naccept= / \nconnection=close\ncontent-length=4\ncontent-type=application/x-www-form-urlencoded\nhost=example.com\nuser-agent=curl/7.54.0\nx-forwarded-for=192.168.99.1\nx-forwarded-host=example.com\nx-forwarded-port=80\nx-forwarded-proto=http\nx-original-uri=/echo\nx-real-ip=192.168.99.1\nx-scheme=http\nBODY:\nmeow\n``` View the Jaeger UI:\n ```\n $ minikube service jaeger-query --url http://192.168.99.100:30183\n``` In the jaeger interface we can see the details:", + "title": "Apply the Ingress Resource" + }, { "location": "/examples/", "text": "Ingress examples\n\u00b6\n\n\nThis directory contains a catalog of examples on how to run, configure and scale Ingress.\n\nPlease review the \nprerequisites\n before trying them.\n\n\n\n\n\n\n\n\nCategory\n\n\nName\n\n\nDescription\n\n\nComplexity Level\n\n\n\n\n\n\n\n\n\n\nApps\n\n\nDocker Registry\n\n\nTODO\n\n\nTODO\n\n\n\n\n\n\nAuth\n\n\nBasic authentication\n\n\npassword protect your website\n\n\nIntermediate\n\n\n\n\n\n\nAuth\n\n\nClient certificate authentication\n\n\nsecure your website with client certificate authentication\n\n\nIntermediate\n\n\n\n\n\n\nAuth\n\n\nExternal authentication plugin\n\n\ndefer to an external authentication service\n\n\nIntermediate\n\n\n\n\n\n\nAuth\n\n\nOAuth external auth\n\n\nTODO\n\n\nTODO\n\n\n\n\n\n\nCustomization\n\n\nConfiguration snippets\n\n\ncustomize nginx location configuration using annotations\n\n\nAdvanced\n\n\n\n\n\n\nCustomization\n\n\nCustom configuration\n\n\nTODO\n\n\nTODO\n\n\n\n\n\n\nCustomization\n\n\nCustom DH parameters for perfect forward secrecy\n\n\nTODO\n\n\nTODO\n\n\n\n\n\n\nCustomization\n\n\nCustom errors\n\n\nserve custom error pages from the default backend\n\n\nIntermediate\n\n\n\n\n\n\nCustomization\n\n\nCustom headers\n\n\nset custom headers before sending traffic to backends\n\n\nAdvanced\n\n\n\n\n\n\nCustomization\n\n\nCustom upstream check\n\n\nTODO\n\n\nTODO\n\n\n\n\n\n\nCustomization\n\n\nExternal authentication with response header propagation\n\n\nTODO\n\n\nTODO\n\n\n\n\n\n\nCustomization\n\n\nSysctl tuning\n\n\nTODO\n\n\nTODO\n\n\n\n\n\n\nFeatures\n\n\nRewrite\n\n\nTODO\n\n\nTODO\n\n\n\n\n\n\nFeatures\n\n\nSession stickiness\n\n\nroute requests consistently to the same endpoint\n\n\nAdvanced\n\n\n\n\n\n\nScaling\n\n\nStatic IP\n\n\na single ingress gets a single static IP\n\n\nIntermediate\n\n\n\n\n\n\nTLS\n\n\nMulti TLS certificate termination\n\n\nTODO\n\n\nTODO\n\n\n\n\n\n\nTLS\n\n\nTLS termination\n\n\nTODO\n\n\nTODO", diff --git a/sitemap.xml b/sitemap.xml index ff1398d3f..72be9b3be 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -4,7 +4,7 @@ / - 2018-06-19 + 2018-06-24 daily @@ -13,19 +13,19 @@ /deploy/ - 2018-06-19 + 2018-06-24 daily /deploy/rbac/ - 2018-06-19 + 2018-06-24 daily /deploy/upgrade/ - 2018-06-19 + 2018-06-24 daily @@ -41,55 +41,55 @@ /user-guide/cli-arguments/ - 2018-06-19 + 2018-06-24 daily /user-guide/custom-errors/ - 2018-06-19 + 2018-06-24 daily /user-guide/default-backend/ - 2018-06-19 + 2018-06-24 daily /user-guide/exposing-tcp-udp-services/ - 2018-06-19 + 2018-06-24 daily /user-guide/external-articles/ - 2018-06-19 + 2018-06-24 daily /user-guide/miscellaneous/ - 2018-06-19 + 2018-06-24 daily /user-guide/multiple-ingress/ - 2018-06-19 + 2018-06-24 daily /user-guide/nginx-status-page/ - 2018-06-19 + 2018-06-24 daily /user-guide/tls/ - 2018-06-19 + 2018-06-24 daily @@ -105,19 +105,19 @@ /examples/ - 2018-06-19 + 2018-06-24 daily /examples/PREREQUISITES/ - 2018-06-19 + 2018-06-24 daily /examples/affinity/cookie/README/ - 2018-06-19 + 2018-06-24 daily @@ -135,37 +135,37 @@ /examples/docker-registry/README/ - 2018-06-19 + 2018-06-24 daily /examples/grpc/README/ - 2018-06-19 + 2018-06-24 daily /examples/multi-tls/README/ - 2018-06-19 + 2018-06-24 daily /examples/rewrite/README/ - 2018-06-19 + 2018-06-24 daily /examples/static-ip/README/ - 2018-06-19 + 2018-06-24 daily /examples/tls-termination/README/ - 2018-06-19 + 2018-06-24 daily @@ -174,7 +174,7 @@ /development/ - 2018-06-19 + 2018-06-24 daily @@ -182,7 +182,7 @@ /how-it-works/ - 2018-06-19 + 2018-06-24 daily @@ -190,7 +190,7 @@ /ingress-controller-catalog/ - 2018-06-19 + 2018-06-24 daily @@ -198,7 +198,7 @@ /troubleshooting/ - 2018-06-19 + 2018-06-24 daily diff --git a/user-guide/third-party-addons/opentracing/index.html b/user-guide/third-party-addons/opentracing/index.html index cd1e4dad2..d50d903d6 100644 --- a/user-guide/third-party-addons/opentracing/index.html +++ b/user-guide/third-party-addons/opentracing/index.html @@ -639,10 +639,66 @@ + + OpenTracing + + + @@ -1045,6 +1101,49 @@ + + + @@ -1059,9 +1158,50 @@

OpenTracing

+

Enables requests served by nginx for distributed tracing via The OpenTracing Project.

Using the third party module opentracing-contrib/nginx-opentracing the NGINX ingress controller can configure NGINX to enable OpenTracing instrumentation. By default this feature is disabled.

-

To enable the instrumentation we just need to enable the instrumentation in the configuration configmap and set the host where we should send the traces.

+

Usage

+

To enable the instrumentation we must enable opentracing in the configuration configmap:

+
data:
+  enable-opentracing: "true"
+
+ + +

We must also set the host to use when uploading traces:

+
zipkin-collector-host: zipkin.default.svc.cluster.local
+jaeger-collector-host: jaeger-collector.default.svc.cluster.local
+
+ + +

Next you will need to deploy a distributed tracing system which uses OpenTracing. Both Zipkin and +Jaeger have been tested.

+

Other optional configuration options:

+
# specifies the port to use when uploading traces
+zipkin-collector-port
+
+# specifies the service name to use for any traces created, Default: nginx
+zipkin-service-name
+
+# specifies the port to use when uploading traces
+jaeger-collector-port
+
+# specifies the service name to use for any traces created, Default: nginx
+jaeger-service-name
+
+# specifies the sampler to be used when sampling traces.
+# The available samplers are: const, probabilistic, ratelimiting, remote, Default: const
+jaeger-sampler-type
+
+# specifies the argument to be passed to the sampler constructor, Default: 1
+jaeger-sampler-param
+
+ + +

Examples

+

The following examples show how to deploy and test different distributed tracing systems. These example can be performed +using Minikube.

+

Zipkin

In the rnburn/zipkin-date-server github repository is an example of a dockerized date service. To install the example and zipkin collector run:

kubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/zipkin.yaml
@@ -1077,22 +1217,98 @@ kubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/ma
   enable-opentracing: "true"
   zipkin-collector-host: zipkin.default.svc.cluster.local
 metadata:
-  name: nginx-configuration
-  namespace: ingress-nginx
-  labels:
-    app: ingress-nginx
+  name: nginx-load-balancer-conf
+  namespace: kube-system
 ' | kubectl replace -f -
 
-

Using curl we can generate some traces:

-
$ curl -v http://$(minikube ip)
-$ curl -v http://$(minikube ip)
-
- - -

In the zipkin interface we can see the details:

-

zipkin screenshot

+

In the zipkin interface we can see the details: +zipkin screenshot

+

Jaeger

+
    +
  1. +

    Enable Ingress addon in minikube: + $ minikube addons enable ingress

    +
  2. +
  3. +

    Add minikube IP to /etc/hosts: + $ echo "$(minikube ip) example.com" | sudo tee -a /etc/hosts

    +
  4. +
  5. +

    Apply a Basic Service and Ingress Resource: + ``` + # Create Echoheaders Deployment + $ kubectl run echoheaders --image=k8s.gcr.io/echoserver:1.4 --replicas=1 --port=8080

    +

    Expose as a Cluster-IP

    +

    $ kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-x

    +

    Apply the Ingress Resource

    +

    $ echo ' + apiVersion: extensions/v1beta1 + kind: Ingress + metadata: + name: echo-ingress + spec: + rules: + - host: example.com + http: + paths: + - backend: + serviceName: echoheaders-x + servicePort: 80 + path: /echo + ' | kubectl apply -f - +```

    +
  6. +
  7. +

    Enable OpenTracing and set the zipkin-collector-host: + $ echo ' apiVersion: v1 kind: ConfigMap data: enable-opentracing: "true" zipkin-collector-host: zipkin.default.svc.cluster.local jaeger-collector-host: jaeger-collector.default.svc.cluster.local metadata: name: nginx-load-balancer-conf namespace: kube-system ' | kubectl replace -f -

    +
  8. +
  9. +

    Apply the Jaeger All-In-One Template: + $ kubectl apply -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml

    +
  10. +
  11. +

    Make a few requests to the Service: + ``` + $ curl example.com/echo -d "meow"

    +

    CLIENT VALUES: +client_address=172.17.0.5 +command=POST +real path=/echo +query=nil +request_version=1.1 +request_uri=http://example.com:8080/echo

    +

    SERVER VALUES: +server_version=nginx: 1.10.0 - lua: 10001

    +

    HEADERS RECEIVED: +accept=/ +connection=close +content-length=4 +content-type=application/x-www-form-urlencoded +host=example.com +user-agent=curl/7.54.0 +x-forwarded-for=192.168.99.1 +x-forwarded-host=example.com +x-forwarded-port=80 +x-forwarded-proto=http +x-original-uri=/echo +x-real-ip=192.168.99.1 +x-scheme=http +BODY: +meow +```

    +
  12. +
  13. +

    View the Jaeger UI: + ``` + $ minikube service jaeger-query --url

    +

    http://192.168.99.100:30183 +```

    +

    In the jaeger interface we can see the details: +jaeger screenshot

    +
  14. +