Deploy GitHub Pages

This commit is contained in:
Travis Bot 2018-06-24 15:16:34 +00:00
parent 5f6f28d5ca
commit b9e3ec6368
7 changed files with 291 additions and 46 deletions

View file

@ -1145,7 +1145,7 @@ in the controller Deployment.</p>
<p>simply change the <code class="codehilite">0.9.0</code> 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):</p>
<div class="codehilite"><pre><span></span>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
</pre></div>

View file

@ -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

View file

@ -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:

BIN
images/jaeger-demo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

View file

@ -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",

View file

@ -4,7 +4,7 @@
<url>
<loc>/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
@ -13,19 +13,19 @@
<url>
<loc>/deploy/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/deploy/rbac/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/deploy/upgrade/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
@ -41,55 +41,55 @@
<url>
<loc>/user-guide/cli-arguments/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/user-guide/custom-errors/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/user-guide/default-backend/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/user-guide/exposing-tcp-udp-services/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/user-guide/external-articles/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/user-guide/miscellaneous/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/user-guide/multiple-ingress/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/user-guide/nginx-status-page/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/user-guide/tls/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
@ -105,19 +105,19 @@
<url>
<loc>/examples/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/examples/PREREQUISITES/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/examples/affinity/cookie/README/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
@ -135,37 +135,37 @@
<url>
<loc>/examples/docker-registry/README/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/examples/grpc/README/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/examples/multi-tls/README/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/examples/rewrite/README/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/examples/static-ip/README/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/examples/tls-termination/README/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
@ -174,7 +174,7 @@
<url>
<loc>/development/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
@ -182,7 +182,7 @@
<url>
<loc>/how-it-works/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
@ -190,7 +190,7 @@
<url>
<loc>/ingress-controller-catalog/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>
@ -198,7 +198,7 @@
<url>
<loc>/troubleshooting/</loc>
<lastmod>2018-06-19</lastmod>
<lastmod>2018-06-24</lastmod>
<changefreq>daily</changefreq>
</url>

View file

@ -639,10 +639,66 @@
<label class="md-nav__link md-nav__link--active" for="toc">
OpenTracing
</label>
<a href="./" title="OpenTracing" class="md-nav__link md-nav__link--active">
OpenTracing
</a>
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#usage" title="Usage" class="md-nav__link">
Usage
</a>
</li>
<li class="md-nav__item">
<a href="#examples" title="Examples" class="md-nav__link">
Examples
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#zipkin" title="Zipkin" class="md-nav__link">
Zipkin
</a>
</li>
<li class="md-nav__item">
<a href="#jaeger" title="Jaeger" class="md-nav__link">
Jaeger
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
@ -1045,6 +1101,49 @@
<label class="md-nav__title" for="toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#usage" title="Usage" class="md-nav__link">
Usage
</a>
</li>
<li class="md-nav__item">
<a href="#examples" title="Examples" class="md-nav__link">
Examples
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#zipkin" title="Zipkin" class="md-nav__link">
Zipkin
</a>
</li>
<li class="md-nav__item">
<a href="#jaeger" title="Jaeger" class="md-nav__link">
Jaeger
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
@ -1059,9 +1158,50 @@
<h1 id="opentracing">OpenTracing<a class="headerlink" href="#opentracing" title="Permanent link">&para;</a></h1>
<p>Enables requests served by nginx for distributed tracing via The OpenTracing Project.</p>
<p>Using the third party module <a href="https://github.com/opentracing-contrib/nginx-opentracing">opentracing-contrib/nginx-opentracing</a> the NGINX ingress controller can configure NGINX to enable <a href="http://opentracing.io">OpenTracing</a> instrumentation.
By default this feature is disabled.</p>
<p>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.</p>
<h2 id="usage">Usage<a class="headerlink" href="#usage" title="Permanent link">&para;</a></h2>
<p>To enable the instrumentation we must enable opentracing in the configuration configmap:</p>
<div class="codehilite"><pre><span></span><span class="n">data</span><span class="o">:</span>
<span class="n">enable</span><span class="o">-</span><span class="n">opentracing</span><span class="o">:</span> <span class="s2">&quot;true&quot;</span>
</pre></div>
<p>We must also set the host to use when uploading traces:</p>
<div class="codehilite"><pre><span></span>zipkin-collector-host: zipkin.default.svc.cluster.local
jaeger-collector-host: jaeger-collector.default.svc.cluster.local
</pre></div>
<p>Next you will need to deploy a distributed tracing system which uses OpenTracing. Both <a href="https://github.com/openzipkin/zipkin">Zipkin</a> and
<a href="https://github.com/jaegertracing/jaeger">Jaeger</a> have been tested.</p>
<p>Other optional configuration options:</p>
<div class="codehilite"><pre><span></span># 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
</pre></div>
<h2 id="examples">Examples<a class="headerlink" href="#examples" title="Permanent link">&para;</a></h2>
<p>The following examples show how to deploy and test different distributed tracing systems. These example can be performed
using Minikube.</p>
<h3 id="zipkin">Zipkin<a class="headerlink" href="#zipkin" title="Permanent link">&para;</a></h3>
<p>In the <a href="https://github.com/rnburn/zipkin-date-server">rnburn/zipkin-date-server</a>
github repository is an example of a dockerized date service. To install the example and zipkin collector run:</p>
<div class="codehilite"><pre><span></span>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
<span class="s1"> enable-opentracing: &quot;true&quot;</span>
<span class="s1"> zipkin-collector-host: zipkin.default.svc.cluster.local</span>
<span class="s1">metadata:</span>
<span class="s1"> name: nginx-configuration</span>
<span class="s1"> namespace: ingress-nginx</span>
<span class="s1"> labels:</span>
<span class="s1"> app: ingress-nginx</span>
<span class="s1"> name: nginx-load-balancer-conf</span>
<span class="s1"> namespace: kube-system</span>
<span class="s1">&#39;</span> <span class="p">|</span> kubectl replace -f -
</pre></div>
<p>Using curl we can generate some traces:</p>
<div class="codehilite"><pre><span></span><span class="gp">$</span> curl -v http://<span class="k">$(</span>minikube ip<span class="k">)</span>
<span class="gp">$</span> curl -v http://<span class="k">$(</span>minikube ip<span class="k">)</span>
</pre></div>
<p>In the zipkin interface we can see the details:</p>
<p><img alt="zipkin screenshot" src="../../../images/zipkin-demo.png" title="zipkin collector screenshot" /></p>
<p>In the zipkin interface we can see the details:
<img alt="zipkin screenshot" src="../../../images/zipkin-demo.png" title="zipkin collector screenshot" /></p>
<h3 id="jaeger">Jaeger<a class="headerlink" href="#jaeger" title="Permanent link">&para;</a></h3>
<ol>
<li>
<p>Enable Ingress addon in minikube:
<code class="codehilite">$ minikube addons <span class="nb">enable</span> ingress</code></p>
</li>
<li>
<p>Add minikube IP to /etc/hosts:
<code class="codehilite">$ <span class="nb">echo</span> <span class="s2">&quot;</span><span class="k">$(</span>minikube ip<span class="k">)</span><span class="s2"> example.com&quot;</span> <span class="p">|</span> sudo tee -a /etc/hosts</code></p>
</li>
<li>
<p>Apply a Basic Service and Ingress Resource:
```
# Create Echoheaders Deployment
$ kubectl run echoheaders --image=k8s.gcr.io/echoserver:1.4 --replicas=1 --port=8080</p>
<h1 id="expose-as-a-cluster-ip">Expose as a Cluster-IP<a class="headerlink" href="#expose-as-a-cluster-ip" title="Permanent link">&para;</a></h1>
<p>$ kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-x</p>
<h1 id="apply-the-ingress-resource">Apply the Ingress Resource<a class="headerlink" href="#apply-the-ingress-resource" title="Permanent link">&para;</a></h1>
<p>$ 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 -
```</p>
</li>
<li>
<p>Enable OpenTracing and set the zipkin-collector-host:
<code class="codehilite">$ <span class="nb">echo</span> <span class="s1">&#39;</span><span class="s1"> apiVersion: v1</span><span class="s1"> kind: ConfigMap</span><span class="s1"> data:</span><span class="s1"> enable-opentracing: &quot;true&quot;</span><span class="s1"> zipkin-collector-host: zipkin.default.svc.cluster.local</span><span class="s1"> jaeger-collector-host: jaeger-collector.default.svc.cluster.local</span><span class="s1"> metadata:</span><span class="s1"> name: nginx-load-balancer-conf</span><span class="s1"> namespace: kube-system</span><span class="s1"> &#39;</span> <span class="p">|</span> kubectl replace -f -</code></p>
</li>
<li>
<p>Apply the Jaeger All-In-One Template:
<code class="codehilite">$ kubectl apply -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml</code></p>
</li>
<li>
<p>Make a few requests to the Service:
```
$ curl example.com/echo -d "meow"</p>
<p>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</p>
<p>SERVER VALUES:
server_version=nginx: 1.10.0 - lua: 10001</p>
<p>HEADERS RECEIVED:
accept=<em>/</em>
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
```</p>
</li>
<li>
<p>View the Jaeger UI:
```
$ minikube service jaeger-query --url</p>
<p>http://192.168.99.100:30183
```</p>
<p>In the jaeger interface we can see the details:
<img alt="jaeger screenshot" src="../../../images/jaeger-demo.png" title="jaeger collector screenshot" /></p>
</li>
</ol>