{"id":9724,"date":"2022-10-26T12:37:04","date_gmt":"2022-10-26T07:07:04","guid":{"rendered":"https:\/\/www.skynats.com\/?p=9724"},"modified":"2024-12-11T16:12:08","modified_gmt":"2024-12-11T10:42:08","slug":"using-cloudflare-argo-tunnel-to-expose-kubernetes-services","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/","title":{"rendered":"Using Cloudflare Argo Tunnel to expose Kubernetes services"},"content":{"rendered":"\n<p>Utilize Cloudflare Argo Tunnel to expose Kubernetes services like a pro with a little assistance from our experts.<\/p>\n\n\n\n<p>As a part of our <a href=\"https:\/\/www.skynats.com\/blog\/\" target=\"_blank\" rel=\"noreferrer noopener\">Server Management Service<\/a>, we at Skynats provide answers to all kinds of questions, no matter how big or small.<\/p>\n\n\n\n<p>Let&#8217;s look at how our support team is prepared to assist clients who are experiencing issues with the http\/2 smuggling vulnerability in Cloudflare.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-use-cloudflare-argo-tunnel-to-expose-kubernetes-services\">How to Use Cloudflare Argo Tunnel to Expose Kubernetes Services<\/h2>\n\n\n\n<p>Before we begin, here is an overview of the architecture:<\/p>\n\n\n\n<p>The procedure entails creating a Cloudflare Argo tunnel. When we&#8217;re done, the.cloudflared directory will contain the following files:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>cert.pem<\/li><li>tunnel-ID.json<\/li><\/ul>\n\n\n\n<p>It is now time to configure the on-premise Kubernetes Cluster. This also entails copying the JSON file&#8217;s contents to the credential-file configmap.<\/p>\n\n\n\n<p>To ensure that it responds to all requests, we must modify the config file that the Ingress-Controller depends on. In this situation, our support team advises using a catch*all to route all traffic to all the CNAME records we will be setting up later. In addition, if we need to set up a specific service mapping, we can create a Hostname\/Service.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apiVersion: v1\r\ndata:\r\n  default.yaml: |-\r\n    tunnel: \r\n    credentials-file: \/etc\/cloudflared\/cred.json\r\n    ingress:\r\n#    - hostname: # ADD specific hostname if needed\r\n#      service: # \r\n# use catch-all service\r\n    - service: http:\/\/traefik.traefik\r\nkind: ConfigMap\r\nmetadata:\r\n  name: config-file\r\n  namespace: cloudflared<\/code><\/pre>\n\n\n\n<p>Additionally, port 9090 is where the Prometheus port is visible.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>annotations:\r\n    prometheus.io\/path: \/metrics\r\n    prometheus.io\/port: \"9090\"\r\n    prometheus.io\/scrape: \"true\"\r\n  labels:\r\n    app: cloudflared\r\nspec:\r\n  containers:\r\n  - args:\r\n    - tunnel\r\n    - --config\r\n    - \/etc\/cloudflared\/default.yaml\r\n    - --metrics\r\n- 0.0.0.0:9090<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-cname-creation-for-the-argo-tunnel\">CNAME creation for the Argo Tunnel<\/h3>\n\n\n\n<p>To route traffic, the Argo Tunnel needs a CNAME record to the tunnel ID. We can set up this k8s resource with the following manifest after configuring the external DNS in Kubernetes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kind: Service\r\napiVersion: v1\r\nmetadata:\r\n  name: cname-test\r\n  annotations:\r\n    external-dns.alpha.kubernetes.io\/hostname: # CLOUDFLARE PUBLIC DOMAIN\r\n    external-dns.alpha.kubernetes.io\/ttl: \"120\" # optional\r\nspec:\r\n  type: ExternalName\r\n  externalName: #TUNNEL ID.cfargotunnel.com<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-putting-it-all-together\">Putting it all together<\/h4>\n\n\n\n<p>After everything has been set up, the web application can be exposed as follows:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>The application should first be deployed to the Kubernetes cluster.<\/li><li>Next, make sure a service is present in the cluster. In this case, ClusterIP will also function.<\/li><li>Then, to expose it behind the IngressController, we must create an Ingress. We must verify that the public record hosted by Cloudflare matches the IngressRoute\/ FQDN\/ Public Domain.<\/li><li>To create a public CNAME record for the service, create a different service to create CNAME.<\/li><\/ol>\n\n\n\n<p>The service will now be available outside of the building.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Are you looking for an answer to another query?\u00a0<a href=\"https:\/\/www.skynats.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener\">Contact<\/a>\u00a0our technical support team.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Utilize Cloudflare Argo Tunnel to expose Kubernetes services like a pro with a little assistance from our experts. As a part of our Server Management Service, we at Skynats provide answers to all kinds of questions, no matter how big or small. Let&#8217;s look at how our support team is prepared to assist clients who [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[747],"class_list":["post-9724","post","type-post","status-publish","format-standard","hentry","category-blog","tag-kubernetes"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Using Cloudflare Argo Tunnel to expose Kubernetes services<\/title>\n<meta name=\"description\" content=\"Utilize Cloudflare Argo Tunnel to expose Kubernetes services like a pro with a little assistance from our experts.\" \/>\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.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Cloudflare Argo Tunnel to expose Kubernetes services\" \/>\n<meta property=\"og:description\" content=\"Utilize Cloudflare Argo Tunnel to expose Kubernetes services like a pro with a little assistance from our experts.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/\" \/>\n<meta property=\"og:site_name\" content=\"Server Management Services | Cloud Management | Skynats\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/skynats\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-26T07:07:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-11T10:42:08+00:00\" \/>\n<meta name=\"author\" content=\"Tony\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@skynatstech\" \/>\n<meta name=\"twitter:site\" content=\"@skynatstech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tony\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\\\/\"},\"author\":{\"name\":\"Tony\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/person\\\/1398d4641035daa52ed8b827e0aafdeb\"},\"headline\":\"Using Cloudflare Argo Tunnel to expose Kubernetes services\",\"datePublished\":\"2022-10-26T07:07:04+00:00\",\"dateModified\":\"2024-12-11T10:42:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\\\/\"},\"wordCount\":365,\"publisher\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\"},\"keywords\":[\"Kubernetes\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\\\/\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\\\/\",\"name\":\"Using Cloudflare Argo Tunnel to expose Kubernetes services\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#website\"},\"datePublished\":\"2022-10-26T07:07:04+00:00\",\"dateModified\":\"2024-12-11T10:42:08+00:00\",\"description\":\"Utilize Cloudflare Argo Tunnel to expose Kubernetes services like a pro with a little assistance from our experts.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.skynats.com\\\/blog\\\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Cloudflare Argo Tunnel to expose Kubernetes services\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\",\"name\":\"Server Management Services | Cloud Management | Skynats\",\"description\":\"Server Management and Cloud Management\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\",\"name\":\"Skynats Technologies\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Sknats-Logo-New-whole.png\",\"contentUrl\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Sknats-Logo-New-whole.png\",\"width\":989,\"height\":367,\"caption\":\"Skynats Technologies\"},\"image\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/skynats\",\"https:\\\/\\\/x.com\\\/skynatstech\",\"https:\\\/\\\/www.instagram.com\\\/skynatstech\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/skynats-technologies\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCvTAjrFJ4_E2MJKwlDHomlg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/person\\\/1398d4641035daa52ed8b827e0aafdeb\",\"name\":\"Tony\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f90e801961478d690f50507d9e19eeecebabab8ab7dfdab7d2d2431114c6acd9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f90e801961478d690f50507d9e19eeecebabab8ab7dfdab7d2d2431114c6acd9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f90e801961478d690f50507d9e19eeecebabab8ab7dfdab7d2d2431114c6acd9?s=96&d=mm&r=g\",\"caption\":\"Tony\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Using Cloudflare Argo Tunnel to expose Kubernetes services","description":"Utilize Cloudflare Argo Tunnel to expose Kubernetes services like a pro with a little assistance from our experts.","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.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/","og_locale":"en_US","og_type":"article","og_title":"Using Cloudflare Argo Tunnel to expose Kubernetes services","og_description":"Utilize Cloudflare Argo Tunnel to expose Kubernetes services like a pro with a little assistance from our experts.","og_url":"https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/","og_site_name":"Server Management Services | Cloud Management | Skynats","article_publisher":"https:\/\/www.facebook.com\/skynats","article_published_time":"2022-10-26T07:07:04+00:00","article_modified_time":"2024-12-11T10:42:08+00:00","author":"Tony","twitter_card":"summary_large_image","twitter_creator":"@skynatstech","twitter_site":"@skynatstech","twitter_misc":{"Written by":"Tony","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/#article","isPartOf":{"@id":"https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/"},"author":{"name":"Tony","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/person\/1398d4641035daa52ed8b827e0aafdeb"},"headline":"Using Cloudflare Argo Tunnel to expose Kubernetes services","datePublished":"2022-10-26T07:07:04+00:00","dateModified":"2024-12-11T10:42:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/"},"wordCount":365,"publisher":{"@id":"https:\/\/www.skynats.com\/blog\/#organization"},"keywords":["Kubernetes"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/","url":"https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/","name":"Using Cloudflare Argo Tunnel to expose Kubernetes services","isPartOf":{"@id":"https:\/\/www.skynats.com\/blog\/#website"},"datePublished":"2022-10-26T07:07:04+00:00","dateModified":"2024-12-11T10:42:08+00:00","description":"Utilize Cloudflare Argo Tunnel to expose Kubernetes services like a pro with a little assistance from our experts.","breadcrumb":{"@id":"https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.skynats.com\/blog\/using-cloudflare-argo-tunnel-to-expose-kubernetes-services\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.skynats.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Using Cloudflare Argo Tunnel to expose Kubernetes services"}]},{"@type":"WebSite","@id":"https:\/\/www.skynats.com\/blog\/#website","url":"https:\/\/www.skynats.com\/blog\/","name":"Server Management Services | Cloud Management | Skynats","description":"Server Management and Cloud Management","publisher":{"@id":"https:\/\/www.skynats.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.skynats.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.skynats.com\/blog\/#organization","name":"Skynats Technologies","url":"https:\/\/www.skynats.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/08\/Sknats-Logo-New-whole.png","contentUrl":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/08\/Sknats-Logo-New-whole.png","width":989,"height":367,"caption":"Skynats Technologies"},"image":{"@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/skynats","https:\/\/x.com\/skynatstech","https:\/\/www.instagram.com\/skynatstech\/","https:\/\/www.linkedin.com\/company\/skynats-technologies","https:\/\/www.youtube.com\/channel\/UCvTAjrFJ4_E2MJKwlDHomlg"]},{"@type":"Person","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/person\/1398d4641035daa52ed8b827e0aafdeb","name":"Tony","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f90e801961478d690f50507d9e19eeecebabab8ab7dfdab7d2d2431114c6acd9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f90e801961478d690f50507d9e19eeecebabab8ab7dfdab7d2d2431114c6acd9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f90e801961478d690f50507d9e19eeecebabab8ab7dfdab7d2d2431114c6acd9?s=96&d=mm&r=g","caption":"Tony"}}]}},"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/9724","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=9724"}],"version-history":[{"count":0,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/9724\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=9724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=9724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=9724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}