<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chirag Patel on Medium]]></title>
        <description><![CDATA[Stories by Chirag Patel on Medium]]></description>
        <link>https://medium.com/@chiragpatel1499?source=rss-9da155b0cdc3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dnXshaX1N9irmgCJXOQQRQ.jpeg</url>
            <title>Stories by Chirag Patel on Medium</title>
            <link>https://medium.com/@chiragpatel1499?source=rss-9da155b0cdc3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 04:25:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chiragpatel1499/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Auto Renew/Provision SSL Certificates For Kubernetes Ingress Domains]]></title>
            <link>https://chiragpatel1499.medium.com/auto-renew-provision-ssl-certificates-for-kubernetes-ingress-domains-5a58caadce19?source=rss-9da155b0cdc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a58caadce19</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[ingress]]></category>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cert-manager]]></category>
            <dc:creator><![CDATA[Chirag Patel]]></dc:creator>
            <pubDate>Thu, 17 Aug 2023 08:40:16 GMT</pubDate>
            <atom:updated>2023-08-17T08:40:16.565Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V63MbkprWpbrtylsNff1sg.gif" /><figcaption>Auto Renew/Provision SSL Certificates For Kubernetes Ingress Domains</figcaption></figure><p>In this, We will setup an auto renew/provision SSL certificate for any Kubernetes ingress domain with the help of cert-manager and the Let’s Encrypt certificate authority. Kubernetes Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster, with traffic routing controlled by rules defined on the Ingress resource. Cert-manager adds certificates and certificate issuers as resource types in Kubernetes clusters, simplifying the process of obtaining, renewing, and using those certificates. SSL certificates display important information for verifying website ownership and encrypting web traffic with SSL/TLS.</p><h3>Prerequisites</h3><ul><li>Basic Knowledge of <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/"><strong><em>kubernetes ingress</em></strong></a>, <a href="https://cert-manager.io/docs/"><strong><em>cert-manager</em></strong></a>, <a href="https://www.cloudflare.com/learning/ssl/what-is-an-ssl-certificate/"><strong><em>SSL Certificate</em></strong></a>, and <a href="https://letsencrypt.org/"><strong><em>Let’s Encrypt</em></strong></a> required</li></ul><h3>Basic introduction of the services and tools</h3><ul><li><a href="https://kubernetes.io/docs/concepts/services-networking/ingress/"><strong><em>kubernetes ingress</em></strong></a><strong><em> </em></strong>exposes HTTP and HTTPS routes from outside the cluster to <a href="https://kubernetes.io/docs/concepts/services-networking/service/">services</a> within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.</li><li><a href="https://cert-manager.io/docs/"><strong><em>cert-manager</em></strong></a><strong><em> </em></strong>adds certificates and certificate issuers as resource types in Kubernetes clusters and simplifies the process of obtaining, renewing, and using those certificates.</li><li><a href="https://www.cloudflare.com/learning/ssl/what-is-an-ssl-certificate/"><strong><em>SSL Certificate</em></strong></a><strong><em> </em></strong>display important information for verifying the owner of a website and encrypting web traffic with SSL/TLS, including the public key, the issuer of the certificate, and the associated subdomains.</li><li><a href="https://letsencrypt.org/"><strong><em>Let’s Encrypt</em></strong></a><em> </em>is a<strong><em> </em></strong>nonprofit Certificate Authority that provides TLS certificates to 300 million websites.</li></ul><h3>Let&#39;s Start!!!</h3><ul><li>Install <strong>cert-manager</strong> in your Kubernetes cluster with the help of the helm chart.</li></ul><pre>helm repo add jetstack https://charts.jetstack.io<br>helm repo update<br>helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.12.0 --set installCRDs=true</pre><ul><li>Create a <a href="https://cert-manager.io/docs/concepts/issuer/"><strong><em>ClusterIssuer</em></strong></a> as given below in the Kubernetes <strong>cluster-issue.yaml</strong>. (Update &lt;YOUR_EMAIL&gt; field with your own email ID.)</li></ul><pre>apiVersion: cert-manager.io/v1<br>kind: ClusterIssuer<br>metadata:<br>  name: cert-issuer<br>spec:<br>  acme:<br>    # The ACME production api URL<br>    server: https://acme-v02.api.letsencrypt.org/directory<br>    # Email address used for ACME registration<br>    email: &lt;YOUR_EMAIL&gt;<br>    # Name of a secret used to store the ACME account private key<br>    privateKeySecretRef:<br>      name: cert-issuer-secret<br>    solvers:<br>    # An empty &#39;selector&#39; means that this solver matches all domains<br>    - selector: {}<br>      http01:<br>        ingress:<br>          class: nginx</pre><ul><li>Run the below command to create a ClusterIssuer resource in Kubernetes.</li></ul><pre>kubectl apply -f cluster-issue.yaml</pre><ul><li>Install <a href="https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx"><strong><em>ingress-nginx</em></strong></a> as an Ingress controller for Kubernetes. Refer to your cloud provider’s instructions for configuring the <a href="https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx#externaldns-service-configuration"><strong><em>ExternalDNS service</em></strong></a><strong><em>.</em></strong></li></ul><pre>helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx<br>helm repo update<br>helm install ingress-nginx ingress-nginx/ingress-nginx --namespace ingress-nginx --create-namespace</pre><ul><li>Make the following YAML files for the deployment, service, and ingress rules of Kubernetes resources. I’ve used Nginx’s straightforward deployment as an example here. You are welcome to utilize your own microservice setup.</li></ul><blockquote>Create a <strong>deployment.yaml </strong>file.</blockquote><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx<br>  labels:<br>    app: nginx<br>spec:<br>  replicas: 3<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: nginx:1.14.2<br>        ports:<br>        - containerPort: 80<br>          name: nginx-port</pre><blockquote>Create a <strong>service.yaml </strong>file.</blockquote><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: nginx<br>spec:<br>  selector:<br>    app: nginx<br>  ports:<br>    - protocol: TCP<br>      port: 80<br>      targetPort: nginx-port</pre><blockquote>Create an <strong>ingress.yaml </strong>file.</blockquote><ul><li>Check out <strong><em>cert-manager.io/cluster-issuer </em></strong><em>and</em><strong><em> cert-manager.io/renew-before </em></strong>ingress rule annotations, which will automatically generate certificates for a particular host and renew based on the specified renew-before time.</li></ul><pre>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  name: nginx<br>  annotations:<br>    cert-manager.io/cluster-issuer: cert-issuer<br>    cert-manager.io/renew-before: 360h<br>    nginx.ingress.kubernetes.io/rewrite-target: /<br>spec:<br>  ingressClassName: nginx<br>  tls:<br>    - hosts:<br>        - www.patelchirag.in<br>      secretName: www-patelchirag-in<br>  rules:<br>  - http:<br>      paths:<br>      - path: /<br>        pathType: ImplementationSpecific<br>        backend:<br>          service:<br>            name: nginx<br>            port:<br>              number: 80</pre><ul><li>Run the command shown below to build the deployment, service, and ingress rules for nginx for the specified hostname.</li></ul><pre>kubectl apply -f deployment.yaml<br>kubectl apply -f service.yaml<br>kubectl apply -f ingress.yaml</pre><ul><li>Make sure your given <strong><em>host name</em></strong> points to the ingress-nginx load balancer’s <strong><em>IP</em></strong> or <strong><em>DNS</em></strong> name in order to verify domain ownership.</li><li>After a short while, check the secret name mentioned in the ingress specification. In our case, <strong>www-patelchirag-in</strong> secret will be generated with SSL certificate containing keys <strong>tls.crt</strong> and <strong>tls.key</strong>.</li><li>Visit the <a href="http://www.patelchirag.in/"><strong><em>www.patelchirag.in</em></strong></a><strong><em> </em></strong>URL in your preferred browser, and you will get your site secured with a <strong>Let’s Encrypt SSL</strong> certificate.</li></ul><p><strong>Wohoo !!! You have successfully set up the auto-renew and auto-provision SSL certificates for Kubernetes ingress domains.</strong></p><blockquote>Connect with me on social media and other platforms.</blockquote><ul><li><a href="https://www.linkedin.com/in/chiragpatel1499/"><strong><em>LinkedIn</em></strong></a> • <a href="https://www.instagram.com/chiragpatel1499/"><strong><em>Instagram</em></strong></a> • <a href="https://twitter.com/chiragpatel1499"><strong><em>Twitter</em></strong></a> • <a href="https://www.facebook.com/chiragpatel1499"><strong><em>Facebook</em></strong></a> • <a href="https://www.patelchirag.in/"><strong><em>Portfolio</em></strong></a> • <a href="https://www.buymeacoffee.com/chiragpatel1499"><strong><em>BuyMeCoffee</em></strong></a><strong><em> </em></strong>•</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a58caadce19" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Host a Static Website Using AWS S3 Bucket, CloudFront, And Route 53 With HTTPS Secure Protocol]]></title>
            <link>https://chiragpatel1499.medium.com/host-a-static-website-using-aws-s3-bucket-cloudfront-and-route-53-with-https-secure-protocol-e22cf2368641?source=rss-9da155b0cdc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e22cf2368641</guid>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[route-53]]></category>
            <category><![CDATA[static-site]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloudfront]]></category>
            <dc:creator><![CDATA[Chirag Patel]]></dc:creator>
            <pubDate>Thu, 22 Oct 2020 04:21:42 GMT</pubDate>
            <atom:updated>2020-10-22T04:21:42.833Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dD5LjYl_whlBXd8b4x5ulQ.png" /></figure><h3>Prerequisites</h3><ol><li>You have your own domain name &amp; DNS management access</li><li>Aws account with access to Route 53, S3 bucket, CloudFront, Amazon Certificate Management (ACM).</li><li>Running Static Website.</li></ol><h4><strong>Basic Intro About AWS Services</strong></h4><p><a href="https://aws.amazon.com/s3/"><strong>S3-Bucket</strong></a>: Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. This means customers of all sizes and industries can use it to store and protect any amount of data for a range of use cases, such as websites, mobile applications, backup and restore, archive, enterprise applications, IoT devices, and big data analytics. Amazon S3 provides easy-to-use management features so you can organize your data and configure finely-tuned access controls to meet your specific business, organizational, and compliance requirements.</p><p><a href="https://aws.amazon.com/route53/"><strong>Route 53</strong></a>: Amazon Route 53 is a highly available and scalable cloud <a href="https://aws.amazon.com/route53/what-is-dns/">Domain Name System (DNS)</a> web service. It is designed to give developers and businesses an extremely reliable and cost-effective way to route end users to Internet applications by translating names like <a href="http://www.example.com/">www.example.com</a> into the numeric IP addresses like 192.0.2.1 that computers use to connect to each other. Amazon Route 53 is fully compliant with IPv6 as well.</p><p><a href="https://aws.amazon.com/cloudfront/"><strong>CloudFront</strong></a>: Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment. CloudFront is integrated with AWS — both physical locations that are directly connected to the AWS global infrastructure, as well as other AWS services.</p><p><a href="https://aws.amazon.com/certificate-manager/"><strong>Amazon Certificate Manager</strong></a><strong>(ACM)</strong>: AWS Certificate Manager is a service that lets you easily provision, manage, and deploy public and private Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services and your internal connected resources. SSL/TLS certificates are used to secure network communications and establish the identity of websites over the Internet as well as resources on private networks.</p><p>Let’s do without wasting time!!!</p><ol><li><strong>Create S3 Bucket for our domain name<br></strong>=&gt; Login to AWS console using <a href="https://console.aws.amazon.com/">https://console.aws.amazon.com/</a><br>=&gt; Click on the Service option at the top of the bar and search service s3 bucket in the search box and click on it.<br>=&gt;Click on the create bucket button and you will get one pop up to create the bucket.<br>=&gt;Enter Detail as mention below:<br> * <strong><em>Bucket name</em></strong>: yourdomainname.com<br> * <strong><em>Region</em></strong>: choose a region near to your customer. (I have chosen Asia Pacific (Mumbai)) and click on next.<br> * <strong><em>Keep Configure</em></strong> options as default don’t change it and click on next.<br> * S<strong><em>et permission </em></strong>section to <strong><em>uncheck Block all public access<br> * Review</em></strong> and click the Create bucket button.<br>=&gt;<strong>repeat the same step and create the second bucket with bucket name as </strong><a href="http://www.yourdomain.com/"><strong>www.yourdomainname.com</strong></a><strong> <br></strong>=&gt; Now you have two buckets available <strong>yourdomainname.com </strong>and <a href="http://www.yourdomainname.com./"><strong>www.yourdomainname.com.</strong></a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*14NQdS-vya4OKndCm8HUKg.png" /></figure><p><strong>2. Upload your static site file content in “yourdomainname.com ”s3 bucket<br></strong>=&gt; Click on the <strong>yourdomainname.com</strong> and enter to s3 bucket console GUI.<br>=&gt; Using the upload &amp; create a folder buttons upload your static site content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n-HfjTN-ZPBS8b55CVOD9A.png" /></figure><p><strong>3. Enable Static Web Hosting in s3 bucket for “<em>yourdomainname.com”</em><br></strong>=&gt; Click on the properties option &amp; click on the static website hosting box.<br> * Select the radio button with the name “<strong><em>Use this bucket to host a website</em></strong>”<br> <strong><em>* Index Document: </em></strong>enter your home page file name with path if it is not in the root directory(ex: index.html)<br> <strong><em>* Error document: </em></strong>Enter your error page path(ex: error.html) <br>* copy the “<strong>Endpoint</strong>” URL of the s3 bucket for yourdomainname.com <br>* Click on the Save button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JBmwbms7WqX-PTvoMk-JIw.png" /></figure><p><strong>4. Enable Static Web Hosting in s3 bucket for </strong><a href="http://www.yourdomainname.com/"><strong>www.<em>yourdomainname.com</em></strong></a><strong><em> </em>and redirect the request to <em>yourdomainname.com<br></em></strong>=&gt; Go to the <a href="http://www.yourdomainname.com/">www.yourdomainname.com</a> s3 bucket console.<br>=&gt; Click on the properties option &amp; click on the static website hosting box.<br> * Select the radio button with the name “<strong><em>Redirect requests</em></strong>”<br>* <strong><em>Target bucket or domain: </em></strong>Enter “<strong>yourdomainname.com</strong>” as s3 bucket name<br>* <strong><em>protocol</em></strong>: http(For not secure web app) &amp; https(for the secure app). we go with https to secure our site.<br>* Copy the “<strong>Endpoint</strong>” URL of the s3 bucket for www.yourdomainname.com<br>* Click on the Save button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ooRyyJJXSJnA0Niw1kiAwA.png" /></figure><p><strong>5. Create Certificate on AWS Certificate manager<br></strong>=&gt;Click on the Service option at the top of the bar and search service Certificate Manager in the search box and click on it <br>=&gt; In the certificate manage console screen click on “<strong>Request certificate</strong>”.<br>=&gt; Choose the radio button named “<strong>Request a public certificate</strong>” and click on button name “<strong>Request certificate</strong>” below of the screen<br><strong>* Step 1: Add domain names : <br>Domain name: “</strong>yourdomainname.com” and click next<br>* <strong>Step 2: Select validation method<br></strong>Select the DNS Validation method &amp; click on next<br><strong>* Step 3: Add tags<br></strong>Add a tag if you want to manage the resource(optional) &amp; click on the review button<br>* <strong>Step 4: Review<br></strong>Review your certificate detail &amp; click on the confirm and request button<br>* <strong>Step 5: Validation<br>=&gt;</strong>Click on the DNS name on the screen and you will get the name and value. Create a CNAME record in the DNS configuration for each of the domains listed below with the value you will get. You must complete this step before AWS Certificate Manager (ACM) can issue your certificate, but you can skip this step for now by clicking <strong>Continue</strong>. To return to this step later, open the certificate request in the ACM Console. <br>=&gt;If you are using <strong>AWS</strong> <strong>Route53</strong> to manage your domain, <strong>ACM</strong> will automatically create the record for you automatically if you choose the DNS validation method for validation.<br>* <strong>Repeat the same step </strong>with the domain name as “<strong>*.yourdomainname.com</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F-9902yQosVLTMZnrZpMyw.png" /></figure><p><strong>6. Create CloudFront Distribution for “yourdomainname.com”<br></strong>=&gt;Click on the Service option at the top of the bar and search service CloudFront in the search box and click on it.<br>=&gt;Click on the “Create Distribution” button.<br><strong>Step 1: Select delivery method<br> </strong>* Click on the get started button of the Web delivery method<br><strong>Step 2: Create distribution<br>* Origin Domain Name: </strong>Endpoint of the yourdomainname.com bucket(we have a copy of that endpoint URL in the “<strong>third step</strong>” and <strong>don’t choose the suggested name of s3 bucket by amazon)<br>* Viewer Protocol Policy: </strong>select the option Redirect HTTP to HTTPS.<br>* <strong>Alternate Domain Names(CNAMEs): </strong>yourdomainname.com<br>* <strong>SSL Certificate: </strong>choose custom SSL and in the box select certificate for “<strong>yourdomainname.com</strong>”.<br>“<strong>keep other things as default. If you want to more configure you can check the document and do it.</strong>”<br>*Click on the “<strong>Create Distribution</strong>” button.<br>* Copy the Cloudfront Distribution Domain name for <a href="http://www.yourdomainname.com/">yourdomainname.com</a> in the general tab of the CloudFront console. (Format like XXXXX.cloudfront.net)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wQHqpCHAo6sL11qB8vq23A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z6HzejvbLmFCko0IMGg9Ag.png" /></figure><p><strong>7. Create CloudFront Distribution for “www.yourdomainname.com” (***Make sure use www.yourdomainname.com certificate and s3 bucket endpoint***)<br></strong>=&gt;Click on the Service option at the top of the bar and search service CloudFront in the search box and click on it.<br>=&gt;Click on the “Create Distribution” button.<br><strong>Step 1: Select delivery method<br> </strong>* Click on the get started button of the Web delivery method.<br><strong>Step 2: Create distribution<br>* Origin Domain Name: </strong>Endpoint of the “<strong>www.yourdomainname.com</strong>” bucket(we have a copy of that endpoint URL in the “<strong>fourth step</strong>” and <strong>don’t choose the suggested name of s3 bucket by amazon)<br>* Viewer Protocol Policy: </strong>select the option Redirect HTTP to HTTPS.<br>* <strong>Alternate Domain Names(CNAMEs): </strong>yourdomainname.com<br>* <strong>SSL Certificate: </strong>choose custom SSL and in the box select certificate for “<strong>*.yourdomainname.com</strong>”.<br>“<strong>keep other things as default. If you want to more configure you can check the document and do it.</strong>”<br>*Click on the “<strong>Create Distribution</strong>” button.<br>* Copy the Cloudfront Distribution Domain name for <a href="http://www.yourdomainname.com/">www.yourdomainname.com</a> in the general tab of the CloudFront console. (Format like XXXXX.cloudfront.net)</p><p><strong>8. Register Domain Route 53<br></strong>=&gt;Click on the Service option at the top of the bar and search service Route 53<strong> </strong>in the search box and click on it.<br>=&gt; Left side panel click on “<strong>Hosted zones”<br></strong>=&gt; Assume That you have created a hosted zone with the domain name as yourdomainname.com and click on it. if not then try to create it first.(<a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/migrate-dns-domain-in-use.html">https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/migrate-dns-domain-in-use.html</a>)<br>=&gt; Update the “<strong>A</strong>” record of “<strong>yourdomainname.com</strong>” with the value as CloudFront distribution domain name of the “<strong>yourdomainname.com</strong>”.(From the sixth step we have copy cloud front domain name like XXXXX.cloudfront.net).<br>=&gt;Update the “<strong>A</strong>” record of “<strong>www.yourdomainname.com</strong>” with the value as CloudFront distribution domain name of the “<strong>www.yourdomainname.com</strong>”.(From the seventh step we have copy cloud front domain name like XXXXX.cloudfront.net).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NOMoii38rtZRW5m5gDZkYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wQ06ysqwqzTLo6n3CD909A.png" /></figure><p><strong>9. Finally, Try in your favorite browser<br></strong>=&gt; Try to access your site in your browser with <strong>yourdomainname.com </strong>or <a href="http://www.yourdomainname.com./"><strong>www.yourdomainname.com</strong></a> For both URL is converted to Https request and secure your site. Sometimes it takes a minute to update so wait and try again.</p><p>Congratulation, you have successfully hosted a static website using Amazon S3 bucket, CloudFront, AWS Certificate Manager, and Route 53.</p><p>You can comment if you faced any issues and share if you liked it.</p><p>Connect with me on social media and other platforms:</p><ol><li><strong><em>Portfolio</em></strong>: <a href="https://www.patelchirag.in/">https://www.patelchirag.in/</a></li><li><strong><em>LinkedIn</em>:</strong> <a href="https://www.linkedin.com/in/chiragpatel1499/">https://www.linkedin.com/in/chiragpatel1499/</a></li><li><strong><em>Twitter</em>:</strong> <a href="https://twitter.com/chiragpatel1499">https://twitter.com/chiragpatel1499</a></li><li><strong><em>Facebook</em></strong>: <a href="https://www.facebook.com/chiragpatel1499">https://www.facebook.com/chiragpatel1499</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e22cf2368641" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ELK Stack Setup in Azure with Fetch Data From EventHub]]></title>
            <link>https://chiragpatel1499.medium.com/elk-stack-setup-in-azure-with-fetch-data-from-eventhub-13420e103a2?source=rss-9da155b0cdc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/13420e103a2</guid>
            <category><![CDATA[logstash]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[azure-event-hub]]></category>
            <category><![CDATA[elk]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Chirag Patel]]></dc:creator>
            <pubDate>Thu, 22 Oct 2020 04:09:42 GMT</pubDate>
            <atom:updated>2020-10-22T04:09:42.511Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lcZp8PuW59aiKIlmwASRWQ.png" /></figure><h3>Prerequisites</h3><p>1. Basic knowledge about the ELK(Elastic Search, Logstash, Kibana).<br>2. Familier with Azure Portal &amp; you must have Azure Account</p><h4>Basic Intro About Used Services</h4><p><a href="https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-elastic-stack.html#install-elasticsearch"><strong>Elasticsearch</strong></a> is a real-time, distributed storage, search, and analytics engine. It can be used for many purposes, but one context where it excels is indexing streams of semi-structured data, such as logs or decoded network packets.</p><p><a href="https://www.elastic.co/guide/en/logstash/master/introduction.html"><strong>Logstash</strong></a> is an open-source data collection engine with real-time pipelining capabilities. Logstash can dynamically unify data from disparate sources and normalize the data into destinations of your choice. Cleanse and democratize all your data for diverse advanced downstream analytics and visualization use cases.</p><p><a href="https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-elastic-stack.html#install-kibana"><strong>Kibana</strong></a> is an open-source analytics and visualization platform designed to work with Elasticsearch. You use Kibana to search, view, and interact with data stored in Elasticsearch indices. You can easily perform advanced data analysis and visualize your data in a variety of charts, tables, and maps.</p><p><a href="https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-about"><strong>Azure Event Hubs</strong></a> is a big data streaming platform and event ingestion service. It can receive and process millions of events per second. Data sent to an event hub can be transformed and stored by using any real-time analytics provider or batching/storage adapters.</p><p>Lets Start!!!</p><p>1.Login to the Azure portal using the mentioned link. <a href="https://portal.azure.com/">https://portal.azure.com/</a></p><p>2. In the portal, search bar type “<strong>Elasticseach(Self-Managed)</strong>” and find in market place section &amp; click it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ja9peT1N4n31O5XV9NM8Ew.png" /></figure><p>3. On Elasticsearch Page click on the create button. it is redirecting to the configuration page for creating an Elasticsearch cluster, Kibana &amp; Logstash setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bU4h-6NLBTKEtkn2zqpaCg.png" /></figure><p><strong>4. Basic Section:<br>Subscription :</strong> &lt;select your subscription&gt;(ex. subscription-1)<br><strong>Resource group</strong>: &lt;select your resource group&gt;(ex: elk-rg)If not exist then create a new one.<br><strong>Region</strong>: &lt;Select your region for this deployment&gt;(ex: South Central US)<br><strong>Username</strong>: &lt;mention username for login in elk virtual machine&gt;(ex:elkadmin)<br><strong>Authentication Type</strong>: &lt;Select Password&gt;(If you want you can go with SSH Public Key)<br><strong>Password</strong>: &lt;Enter Strong Password for login in elk virtual machine&gt;(ex:ElK$Set!78%!!1)<br><strong>Confirm Password</strong>: &lt;Enter the same password as above step&gt;<br>=&gt; Click on <strong>Next: Cluster Settings</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4NUKr46lyqv1jPHo-3_Pcw.png" /></figure><p><strong>5. Cluster Settings:<br>Elasticsearch Version</strong>: &lt;Select Latest Version&gt;(v7.9.0)<br><strong>Cluster name</strong>: &lt;Enter Cluster Name&gt;(ex: elk-cluster)<br><strong>Virtual network</strong>: &lt;Default as it is&gt;(You can create or select existing one)<br><strong>Elasticsearch node subnet</strong>:&lt;Default as it is&gt;(You can create or select existing one)<br>=&gt; Click on <strong>Next: Nodes Configuration</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m_odcOKUti94aJ1kFNNS3Q.png" /></figure><p><strong>6. Nodes Configuration:</strong><br><strong>Hostname prefix</strong>:(The prefix to use for hostnames when naming virtual machines in the cluster. Hostnames are used for resolution of master nodes so if you are deploying a cluster into an existing virtual network containing an existing Elasticsearch cluster, be sure to set this to a unique prefix, to differentiate the hostnames of this cluster from an existing cluster)(ex: elk)<br><strong>=&gt; For Data nodes section</strong><br><strong>Number of data nodes</strong>: 3<br><strong>Data node VM size</strong>: DS1 v2(1 vcpu, 3.5GM memory)<br><strong>Data nodes are master eligible</strong>: Allow data nodes to be master eligible, setting this to Yes will no longer deploy the 3 dedicated master nodes. Select yes.<br><strong>=&gt; Data node disks<br>Number of managed disks per data node:</strong>1<strong><br>Size of each managed disk:</strong>32GiB<strong><br>Type of manages disks: </strong>The storage type of managed disks. The default will be Premium disks for VMs that support Premium disks and Standard disks for those that do not. Choose “<strong>Standard disks”</strong>.<br><strong>=&gt;Master nodes<br>Master node VM size:</strong>DS1 v2(1 vcpu, 3.5GM memory)<br><strong>Client nodes(optional)</strong>:0<br>=&gt; Choose an option based on your load and requirements.<br>=&gt; click <strong>Next: Nodes Configuration</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*It1qnQSkuE2U4T2Ssem58g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s3O6furTiVPtZxq7gi-ayA.png" /></figure><p><strong>7. Kibana &amp; Logstash<br>=&gt; Kibana<br>Install Kibana</strong>: yes<br><strong>Kibana VM size</strong>: Standard A2 v2(2 vcpu,4GB memory)<br><strong>=&gt; Logstash<br>Install Logstash: </strong>Yes<br><strong>Number of Logstash VMs</strong>: 1<br><strong>Logstash VM size</strong>: Standard DS1 v2(1 vcpu,3.5 GB memory)<br><strong>Logstash config file</strong>: skip it now we will add it manually.<br><strong>Additional Logstash plugins</strong>: logstash-input-azure_event_hubs<strong><br>=&gt;External Access</strong><br><strong>Use a jump box</strong>: no(A jump box allows you to connect to your cluster from a public access point like SSH. This is usually not necessary if Kibana is installed since Kibana itself acts as a jump box.)<br><strong>Load balancer type</strong>: External(Choose whether the load balancer should be public-facing (external) or internal.).<br>=&gt;click on <strong>Next: Security</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E7ybfTkfzHtrnOWYQio6Jw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cOSIAWS9p46bTeOaZnzLoQ.png" /></figure><p><strong>8. Security:<br>=&gt;</strong>In this section set password for all the built-in users of ELK Stack.<br>=&gt; click on <strong>Next: Certificates</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oHEdwVQ_N-TTO4b9Ab68yw.png" /></figure><p><strong>9. Certificates:<br></strong>=&gt; In this section you can set up the Certificate for the HTTP and TLS <br>=&gt; If you want you can set up otherwise skip this as default<br>=&gt; Click on <strong>Next:Review + Create</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*trX55Ef4uwwRayQ-35h3UA.png" /></figure><p><strong>10. Review + Create:<br></strong>=&gt; Wait for the azure to validate the details and after a click on create.<br>=&gt; Wait some time for deployment succeeded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*smckSO7Drma_C8dDjL32uw.png" /></figure><p>***Let&#39;s Create Event Hub namespace and event hub In azure***</p><p><strong>11. Create EventHub Namespace, Event hub &amp; Consumer Group:<br></strong>=&gt; Go to the below link and create event namespace and event hub<br><a href="https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create">https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create</a><br>=&gt; After that go to that event hub and create the consumer group. From the below image.<br>=&gt; Go to that created event hub and copy the “Connection string–primary key”</p><p>***Now you ready with elastic cluster, Logstash, and kibana in a virtual machine running in the Azure environment. Let&#39;s configure the event hub &amp; logstash for running almost real-time logs fetch pipeline and visualize in kibana dashboard.***</p><p><strong>11. Go to the resource group you used for this deployment<br>=&gt; </strong>In the portal, search bar type “Resource groups” and click it.<br>=&gt; Click on your resource group which you choose or create at the time of the creation of the ELK service in azure. (From step 4)</p><p><strong>12. SSH into logstash virtual machine using kibana virtual machine<br></strong>=&gt; Find the kibana virtual machine and click on it.<br>=&gt; You will find the public Ip address of the kibana in the overview section<br>=&gt; Open your local machine terminal and ssh into kibana using VM.<br>=&gt; Command: ssh &lt;admin&gt;@&lt;public IP of kibana&gt; (ex: ssh admin@255.255.255.255). <br>=&gt;admin is the username from step 4. For the first time asks to add the host in the machine so type yes and enter the password. You should be in the kibana virtual machine.<br>=&gt; In that kibana SSH session login into logstash virtual machine using same step as kibana.(ex: ssh &lt;admin&gt;@&lt;private IP of the logstash&gt; ). You will find the private in the logstash virtual machine in the overview section of logstash vm.<br>=&gt; Now you finally ssh into the logstash VM.</p><p><strong>13. Run the pipeline in Logstash virtual machine<br></strong>=&gt;Go to the folder using this command “cd /etc/logstash/conf.d/”<br>=&gt; In that folder create the file logstash.conf and add the below content to the file.</p><blockquote>input {<br>azure_event_hubs{<br>event_hub_connections =&gt; [“&lt;event-hub-connection-string&gt;”]<br>threads =&gt; 16<br>decorate_events =&gt; true<br>consumer_group =&gt; “&lt;event-hub-consumer-group&gt;”<br>initial_position =&gt; “end”<br>storage_connection =&gt; “&lt;storage-account-connection-string&gt;”<br>storage_container =&gt; “&lt;storage-account-name&gt;”<br>}<br>}<br>## Add your filters / logstash plugins configuration here<br>filter{<br>json {<br>source =&gt; “message”<br>remove_field =&gt; “message”<br>}<br>if event.get(‘[payload][op]’) != ‘d’ then<br>event.get(‘[payload][after]’).each {|k, v|<br>event.set(k,v)<br>}<br>end<br>event.set(‘op’, event.get(‘[payload][op]’).downcase)<br>“<br>}<br>mutate {<br>remove_field =&gt; [“schema”,”payload”]<br>}<br>}<br>output {<br>stdout { codec =&gt; rubydebug }<br>if [op] != “d” {<br>elasticsearch {<br>hosts =&gt; [“&lt;elasticsearch hosts&gt;:9200&quot;]<br>index =&gt; “sql-server-%{+YYYY-MM-dd}”<br>user =&gt; “elastic”<br>password =&gt; “&lt;password for built in elastic user&gt;”<br>sniffing =&gt; “true”<br>}<br>}<br>}</blockquote><p>=&gt; This file is a filter log which comes from the SQL server to Event-Hub.<br>=&gt; Change the following parameter in file.</p><blockquote><strong>event_hub_connections :</strong> your event-hub connections string(from step 11 )<br><strong>consumer_group:</strong> your event hub consumer group (from step 11)<br><strong>storage_connection</strong>: storage account connection string(creat it if not exists)<br><strong>storage_container:</strong> name of the storage account from the storage container<br><strong>hosts:</strong> hosts of the elastic search(you can find in internal load balancing)<br><strong>user:</strong> built-in user ‘elastic’<br><strong>password:</strong> password for built-in ‘elastic’ user</blockquote><p>=&gt; Make sure you change the comma(“”) to the normal comma of the editor when you add content to the file.<br>=&gt;Run the below command to start the pipeline.</p><blockquote>sudo /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf</blockquote><p>Congratulation, you have successfully created the almost real-time pipeline from the event-hub to ELK Stack.</p><p>You can comment if you faced any issues and share if you liked it.</p><p>Connect with me on social media and other platforms:</p><ol><li><strong><em>Portfolio</em></strong>: <a href="https://www.patelchirag.in/">https://www.patelchirag.in/</a></li><li><strong><em>LinkedIn</em>:</strong> <a href="https://www.linkedin.com/in/chiragpatel1499/">https://www.linkedin.com/in/chiragpatel1499/</a></li><li><strong><em>Twitter</em>:</strong> <a href="https://twitter.com/chiragpatel1499">https://twitter.com/chiragpatel1499</a></li><li><strong><em>Facebook</em></strong>: <a href="https://www.facebook.com/chiragpatel1499">https://www.facebook.com/chiragpatel149</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13420e103a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create Cloud SQL instance for the PostgreSQL database in Google Cloud Platform]]></title>
            <link>https://medium.com/dscddu/how-to-create-cloud-sql-instance-for-the-postgresql-database-in-google-cloud-platform-1b57aa205682?source=rss-9da155b0cdc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b57aa205682</guid>
            <category><![CDATA[cloud-sql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[postgresql]]></category>
            <dc:creator><![CDATA[Chirag Patel]]></dc:creator>
            <pubDate>Thu, 05 Mar 2020 16:54:12 GMT</pubDate>
            <atom:updated>2020-09-29T13:01:11.824Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, I will show you how to create Cloud SQL instance for the PostgreSQL database in Google Cloud Platform. PostgreSQL is a SQL database. GCP provides SaaS(Software as a Service) for creating a database instance using a few clicks. You don’t have to take care of the server Maintenance, Availability or Scalability of the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*hPL1EgUxwMJhahoPefas3Q.png" /></figure><p><strong>Prerequisites</strong></p><ol><li>You should have some basic knowledge about Cloud Computing services like IaaS, PaaS, SaaS, etc.</li><li>I hope you have GCP credit to access the portal. If you don’t have then you can try free tier using this <a href="https://cloud.google.com/free/docs/gcp-free-tier">link</a>.</li></ol><p><strong>Different Way to create a PostgreSQL Instance</strong></p><ol><li>gcloud Command Line</li><li>REST API</li><li>Cloud Console</li></ol><p>For this article, I will use the Cloud Console to create an instance.</p><ol><li>Go to the <a href="https://console.cloud.google.com/">Google Cloud Console</a>. Click on the left-hand panel top <strong>Menu-&gt;SQL(</strong>storage section<strong>).</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*dSSIooEFmDCBJCYnzDpRpQ.png" /></figure><p>2. Click on the Create Instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*YKexevRCxPw46RpC9P_tKw.png" /></figure><p>3. There are three different database engines available.</p><ul><li>MySQL</li><li>PostgreSQL</li><li>SQL Server</li></ul><p>Click on PostgreSQL database Engine for this article. Based on your requirements you can choose another option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JD3HBzV8F2fsIfTsaJUIvw.png" /></figure><p>4. Fill up the required detail for PostgreSQL instance.</p><p>You can enter suitable details for Instance id, Password, Database Version and Location which is nearest to your users. For this article, I filled the detail which is shown in the below image. There are other configurations also as Connectivity, Machine type and storage, Flag, etc. For normal instance skip these configuration options. Click on the Create button at the left-bottom of the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*W10ZfoOerO0P1Oya6c5eRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*_jMwVPhPyAld-2-B46hPwQ.png" /></figure><p>Wait for a few minutes until the instance is being created. When you see the green mark on the instance then click on that. It will show all the metadata related to the PostgreSQL instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*CqvYkKu43aqCqTx2ebgkew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fQJfb9kDJkiNNX_AJYbfw.png" /></figure><p>There are various options available on the top bar like Edit, Stop, Delete, etc. In the left-hand panel also other options are available like Connections, Users, Databases, etc. For more information follow this <a href="https://cloud.google.com/sql/docs/postgres/create-instance">link</a> of the official documentation of the Google Cloud Platform.</p><p>Congratulation, you have successfully created PostgreSQL Instance on the Google Cloud Platform of Software as a Service.</p><p>You can comment if you faced any issues and share if you liked it.</p><p>Connect with me on social media and other platforms:</p><ol><li><strong><em>Portfolio</em></strong>: <a href="https://www.patelchirag.in/">https://www.patelchirag.in/</a></li><li><strong><em>LinkedIn</em>:</strong> <a href="https://www.linkedin.com/in/chiragpatel1499/">https://www.linkedin.com/in/chiragpatel1499/</a></li><li><strong><em>Twitter</em>:</strong> <a href="https://twitter.com/chiragpatel1499">https://twitter.com/chiragpatel1499</a></li><li><strong><em>Facebook</em></strong>: <a href="https://www.facebook.com/chiragpatel1499">https://www.facebook.com/chiragpatel1499</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b57aa205682" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dscddu/how-to-create-cloud-sql-instance-for-the-postgresql-database-in-google-cloud-platform-1b57aa205682">How to create Cloud SQL instance for the PostgreSQL database in Google Cloud Platform</a> was originally published in <a href="https://medium.com/dscddu">DSC DDU</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>