{"id":1476,"date":"2021-07-19T22:08:57","date_gmt":"2021-07-19T20:08:57","guid":{"rendered":"https:\/\/www.netexpertise.eu\/en\/?p=1476"},"modified":"2021-07-19T22:08:59","modified_gmt":"2021-07-19T20:08:59","slug":"how-to-access-proxysql-web-interface-on-kubernetes","status":"publish","type":"post","link":"http:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html","title":{"rendered":"How to Access ProxySQL Web Interface on Kubernetes"},"content":{"rendered":"\n<p>I wrote in a previous post about a <a href=\"\/en\/database\/mysql\/proxysql-helm-chart-load-rules-from-sql-query-set.html\">ProxySQL Helm chart<\/a> for Kubernetes, in which you can configure the pod from SQL queries. The chart includes an ingress to reach the stats server on port 6080. Here are a few steps to get this working.<\/p>\n\n\n\n<p><br>Ingress needs to be activated in the Helm Values file and ProxySQL web server also requires the admin-web_enabled admin variable to be set.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"yaml\" class=\"language-yaml\">ingress:\n  enabled: true\n  annotations:\n    kubernetes.io\/ingress.class: nginx\n  hosts:\n    - host: proxy.domain.lan\n      paths:\n        - \/\n\nsqlqueries: |\n  SET admin-web_enabled='true';\n  LOAD ADMIN VARIABLES TO RUNTIME;\n  -- other SQL queries<\/code><\/pre>\n\n\n\n<p><br>If you leave it like this, HTTP connections to the web interface will throw the following error:<br><em>Error: received handshake message out of context<\/em><br>ProxySQL web interface accepts <a href=\"https:\/\/github.com\/sysown\/proxysql\/issues\/2550\" target=\"_blank\" rel=\"noreferrer noopener\">HTTPS connections<\/a> only &#8211; even though examples in the documentation use HTTP &#8211; and there&#8217;s no workaround it.<\/p>\n\n\n\n<p><br>Ingress has to connect to the backend using the HTTPS protocol. Nginx lets you specify the protocol used with the <a href=\"https:\/\/kubernetes.github.io\/ingress-nginx\/user-guide\/nginx-configuration\/annotations\/#backend-protocol\" target=\"_blank\" rel=\"noreferrer noopener\">backend-protocol annotation<\/a>. You still have the choice to leave ingress access from outside in HTTP, but don&#8217;t on a public interface.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"yaml\" class=\"language-yaml\">nginx.ingress.kubernetes.io\/backend-protocol: \"HTTPS\"<\/code><\/pre>\n\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wrote in a previous post about a ProxySQL Helm chart for Kubernetes, in which you can configure the pod from SQL queries. The chart includes an ingress to reach the stats server on port 6080. Here are a few steps to get this working. Ingress needs to be activated in the Helm Values file [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[423,424,4],"tags":[447,443,385,446],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Netexpertise - How to Access ProxySQL Web Interface on Kubernetes<\/title>\n<meta name=\"description\" content=\"Install ProxySQL Helm chart on Kubernetes, enable the web interface, and give access through Kubernetes Nginx ingress\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netexpertise - How to Access ProxySQL Web Interface on Kubernetes\" \/>\n<meta property=\"og:description\" content=\"Install ProxySQL Helm chart on Kubernetes, enable the web interface, and give access through Kubernetes Nginx ingress\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html\" \/>\n<meta property=\"og:site_name\" content=\"Netexpertise\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-19T20:08:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-19T20:08:59+00:00\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@netexpertise\" \/>\n<meta name=\"twitter:site\" content=\"@netexpertise\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html\",\"url\":\"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html\",\"name\":\"Netexpertise - How to Access ProxySQL Web Interface on Kubernetes\",\"isPartOf\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#website\"},\"datePublished\":\"2021-07-19T20:08:57+00:00\",\"dateModified\":\"2021-07-19T20:08:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\"},\"description\":\"Install ProxySQL Helm chart on Kubernetes, enable the web interface, and give access through Kubernetes Nginx ingress\",\"breadcrumb\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.netexpertise.eu\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Access ProxySQL Web Interface on Kubernetes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#website\",\"url\":\"https:\/\/www.netexpertise.eu\/en\/\",\"name\":\"Netexpertise\",\"description\":\"Systems \/ Networks \/ DevOps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.netexpertise.eu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"sameAs\":[\"http:\/\/www.netexpertise.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netexpertise - How to Access ProxySQL Web Interface on Kubernetes","description":"Install ProxySQL Helm chart on Kubernetes, enable the web interface, and give access through Kubernetes Nginx ingress","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html","og_locale":"en_US","og_type":"article","og_title":"Netexpertise - How to Access ProxySQL Web Interface on Kubernetes","og_description":"Install ProxySQL Helm chart on Kubernetes, enable the web interface, and give access through Kubernetes Nginx ingress","og_url":"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html","og_site_name":"Netexpertise","article_published_time":"2021-07-19T20:08:57+00:00","article_modified_time":"2021-07-19T20:08:59+00:00","author":"dave","twitter_card":"summary_large_image","twitter_creator":"@netexpertise","twitter_site":"@netexpertise","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html","url":"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html","name":"Netexpertise - How to Access ProxySQL Web Interface on Kubernetes","isPartOf":{"@id":"https:\/\/www.netexpertise.eu\/en\/#website"},"datePublished":"2021-07-19T20:08:57+00:00","dateModified":"2021-07-19T20:08:59+00:00","author":{"@id":"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa"},"description":"Install ProxySQL Helm chart on Kubernetes, enable the web interface, and give access through Kubernetes Nginx ingress","breadcrumb":{"@id":"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.netexpertise.eu\/en\/docker\/kubernetes\/how-to-access-proxysql-web-interface-on-kubernetes.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.netexpertise.eu\/en"},{"@type":"ListItem","position":2,"name":"How to Access ProxySQL Web Interface on Kubernetes"}]},{"@type":"WebSite","@id":"https:\/\/www.netexpertise.eu\/en\/#website","url":"https:\/\/www.netexpertise.eu\/en\/","name":"Netexpertise","description":"Systems \/ Networks \/ DevOps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.netexpertise.eu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","caption":"dave"},"sameAs":["http:\/\/www.netexpertise.eu"]}]}},"_links":{"self":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/1476"}],"collection":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/comments?post=1476"}],"version-history":[{"count":0,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/1476\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/media?parent=1476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/categories?post=1476"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/tags?post=1476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}