<?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 Fatih Yarbaşı on Medium]]></title>
        <description><![CDATA[Stories by Fatih Yarbaşı on Medium]]></description>
        <link>https://medium.com/@fyarbasi?source=rss-8429e585f741------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EfIt6gjZHgi3g14X.jpg</url>
            <title>Stories by Fatih Yarbaşı on Medium</title>
            <link>https://medium.com/@fyarbasi?source=rss-8429e585f741------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 11:54:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fyarbasi/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[Serilog Stopped Sending Logs to OpenSearch and How to Resolve]]></title>
            <link>https://medium.com/@fyarbasi/serilog-stopped-sending-logs-to-opensearch-and-how-to-resolve-cb7022bb5850?source=rss-8429e585f741------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb7022bb5850</guid>
            <category><![CDATA[serilog]]></category>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[opensearch]]></category>
            <category><![CDATA[net-core]]></category>
            <dc:creator><![CDATA[Fatih Yarbaşı]]></dc:creator>
            <pubDate>Mon, 05 Aug 2024 07:58:08 GMT</pubDate>
            <atom:updated>2024-08-05T07:58:08.348Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, we’ll walk through the steps we took to resolve an issue where Serilog stopped pushing logs to OpenSearch.</p><h3>Enabling Serilog Debugging</h3><p>I was initially unaware that we could debug Serilog. Here’s how we enabled debugging in our configuration file:</p><pre>using System.IO;<br>using Serilog.Debugging;<br><br>SelfLog.Enable(Console.Out);</pre><h3>Debugging Output</h3><p>With debugging enabled, we saw the following authentication error:</p><pre>OpenSearch.Net.OpenSearchClientException: Could not authenticate with the specified node. Try verifying your credentials or check your Shield configuration.</pre><p>We discovered that this was because we created a new user but did not assign the necessary roles.</p><h3>Resolving Authentication Issues</h3><p>After assigning the correct roles to the new user, the authentication issue was resolved. However, we then encountered a new error related to the maximum shard limit:</p><pre>2024-07-31T10:44:39.2221491Z Failed to store event with template &#39;Hello, Serilog!&#39; into OpenSearch. OpenSearch reports for index -logs-2024.07.31 the following: {&quot;type&quot;:&quot;illegal_argument_exception&quot;,&quot;reason&quot;:&quot;Validation Failed: 1: this action would add [10] total shards, but this cluster currently has [2000]/[2000] maximum shards open;&quot;}</pre><h3>Resolving the Shard Limit Issue</h3><p>We discovered that Serilog defaults to 5 shards per index. For our volume of data, 1 shard per index was sufficient. We created a new index template in OpenSearch:</p><pre>PUT /_template/serilog_template<br>{<br>  &quot;index_patterns&quot;: [&quot;serilog-*&quot;],<br>  &quot;settings&quot;: {<br>    &quot;number_of_shards&quot;: 1<br>  }<br>}</pre><p>We then updated the Serilog configuration to use this template by setting the templateName in the configuration file.</p><pre>  &quot;WriteTo&quot;: [<br>      {<br>        &quot;Name&quot;: &quot;OpenSearch&quot;,<br>        &quot;Args&quot;: {<br>          &quot;nodeUris&quot;: &quot;https://open-search-url/&quot;,<br>          &quot;indexFormat&quot;: &quot;logs-{0:yyyy.MM.dd}&quot;,<br>          &quot;connectionGlobalHeaders&quot;: &quot;Authorization=Basic token&quot;,<br>          &quot;templateName&quot;: &quot;template-for-logs&quot;<br>        }<br>      },</pre><p>We deleted some of the old indices to free up shard space and redeployed the application. This resolved the issue, and logs started flowing to OpenSearch again.</p><h3>Conclusion</h3><p>By systematically debugging and adjusting configurations, we resolved the issue efficiently. Here’s a summary of the steps taken:</p><ol><li>Enabled Serilog debugging.</li><li>Corrected user roles to resolve authentication errors.</li><li>Addressed the shard limit by creating a new index template.</li><li>Updated Serilog to use the new template.</li></ol><p>This structured approach ensured reliable log delivery with Serilog and OpenSearch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb7022bb5850" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Our Microsoft for Startups Founders Hub Acceptance and the Unexpected Elastic.co Costs]]></title>
            <link>https://medium.com/@fyarbasi/our-microsoft-for-startups-founders-hub-acceptance-and-the-unexpected-costs-a900495055e7?source=rss-8429e585f741------2</link>
            <guid isPermaLink="false">https://medium.com/p/a900495055e7</guid>
            <category><![CDATA[hidden-cost]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[microsoft-for-startups]]></category>
            <category><![CDATA[elastic]]></category>
            <dc:creator><![CDATA[Fatih Yarbaşı]]></dc:creator>
            <pubDate>Thu, 11 Jul 2024 13:31:25 GMT</pubDate>
            <atom:updated>2024-07-12T07:26:03.590Z</atom:updated>
            <content:encoded><![CDATA[<p>On April 10th, we were happy to receive our acceptance email from the Microsoft for Startups Founders Hub program. This was what we hoped would be a beneficial collaboration with Microsoft Azure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*A3uTEr9aHHyJtJePzd8ebQ.png" /><figcaption>Acceptance email from Microsoft for Startups Founders Hub</figcaption></figure><p>We were optimistic and pleased about the $5,000 Azure credit that came with the program, where our staging environments could transition smoothly from AWS to Azure. Our production environment would remain on AWS for the time being, but who knew? If everything went well, we might even consider moving our production to Azure.</p><h4>The Move to Azure and the Test Installation</h4><p>We moved our staging environments to Azure. On May 18th, in the spirit of testing, we installed an Elastic instance. As a startup, keeping a close eye on our costs is crucial, so we were diligent in monitoring our credit usage on Azure. Everything seemed fine throughout May, and there was no discrepancy in our costs after installing Elastic. Since it was a test installation, we didn’t actually use the service, and it slipped from our minds.</p><h4>The Surprise of the June Invoice</h4><p>Fast forward to mid-June, and we received an unexpected notification: we had an outstanding invoice on Azure for Elastic. We immediately began investigating and discovered that the Elastic service was not included in our Azure credit subscription. This information was not clearly stated at the time of installation, leading to this unforeseen cost.</p><h4>The Fine Print and the Hidden Costs</h4><p>After contacting the support teams at both Azure and Elastic, we were directed to this page: <a href="https://azure.microsoft.com/en-us/pricing/offers/ms-azr-0036p">Azure Sponsorship Program</a>. Here, it vaguely mentions that</p><blockquote>“<em>Special pricing does not apply to Microsoft Azure support plans, third-party branded products, products sold through Microsoft Azure Marketplace, or products otherwise sold separately from Microsoft Azure (for example, Active Directory Premium).</em>”</blockquote><p>It is not immediately understandable that Elastic, an open-source platform, would be classified as an external service requiring additional costs. Such crucial information should be more prominently displayed, especially for services that incur significant charges.</p><h4>The Hidden Cost Surprise</h4><p>Let’s say we missed this detail — we’re only human, after all. But here’s the kicker: we were consistently monitoring our costs on the Azure page, and there was no indication of the accumulating charges for the Elastic instance until the end of the month!</p><p>Why were these costs hidden until the end of the billing cycle? If we had known the next day, we could have immediately shut down the service, preventing any further charges.</p><p>As a result, we were invoiced £348 for May and £545 for June, totaling nearly £900 for a service we didn’t use for a single second. This experience has been an expensive lesson in the importance of understanding the fine print and being aware of what we sign up for and subscribe to as startups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*vq2zR5fXgibfoFEDdv407w.png" /><figcaption>The hidden cost suprise from Azure!</figcaption></figure><h4>Why Elastic.co Needs to Change Their Approach</h4><p>Elastic.co’s current approach to billing and communication needs improvement, especially for startups that rely on clear and predictable cost structures.</p><p><strong>Transparent Communication</strong>:</p><ul><li>Elastic.co must provide clearer information about their billing practices, especially when their services are used with third-party platforms like Azure. Customers should know upfront about any exclusions and potential charges.</li></ul><p><strong>Proactive Cost Alerts</strong>:</p><ul><li>Implementing proactive cost alert systems would help users avoid unexpected charges. Notifications about inactive or unused services can allow users to take action before significant costs accrue.</li></ul><p><strong>Fair Billing Practices</strong>:</p><ul><li>Charging for inactive services is unfair. Elastic should consider offering refunds or credits for unused services, particularly when the user was unaware of the charges due to unclear communication.</li></ul><p><strong>Responsive Support</strong>:</p><ul><li>Elastic’s support team should be more empathetic and flexible in handling billing disputes. Better support can build long-term customer loyalty and trust.</li></ul><h4>Lessons Learned and Conclusion</h4><ul><li>Startups must thoroughly understand the exclusions and fine print of any program or credit.</li><li>Cloud service providers should ensure exclusions are clearly stated and easily understood at the time of installation.</li><li>Our journey with Microsoft Azure and Elastic has highlighted the need for transparency and careful checking of cloud service details.</li><li>As we move <a href="https://dealforward.com/">Forward</a>, we hope our story helps other startups be more cautious and proactive in managing their cloud services and costs.</li><li>It’s not just about the technology; it’s about the transparency and clarity of the services you rely on to build your future.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a900495055e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a Manual Snapshot Repository in OpenSearch on AWS]]></title>
            <link>https://medium.com/@fyarbasi/how-to-create-a-manual-snapshot-repository-in-opensearch-on-aws-222948edd2e2?source=rss-8429e585f741------2</link>
            <guid isPermaLink="false">https://medium.com/p/222948edd2e2</guid>
            <dc:creator><![CDATA[Fatih Yarbaşı]]></dc:creator>
            <pubDate>Sat, 25 May 2024 13:04:30 GMT</pubDate>
            <atom:updated>2024-05-25T13:20:06.406Z</atom:updated>
            <content:encoded><![CDATA[<p>This tutorial focuses on configuring the OpenSearch service running on AWS, not on standalone or on-premises installations.</p><p>While OpenSearch on AWS provides automatic snapshots that keep 14 days of daily snapshots in AWS S3 buckets, these are managed automatically and cannot be manipulated.</p><p>To take manual snapshots, you need to create a snapshot repository first. Here’s a detailed guide on how to define a new repository.</p><h3>1. Create Your S3 Bucket</h3><p>- Create a new S3 bucket and name it “open-search-backups”.</p><h3>2. Create a New IAM User to Sign API Requests</h3><p>- Create a new IAM user for sending API requests to OpenSearch.<br>- This user will be used to send the request for adding a new repository as an API call. Let’s name this user `open-search-admin`.</p><blockquote>arn:aws:iam::12345678:user/open-search-admin</blockquote><p>- Create the Access Key and Secret Key credentials for this user and use them in your API request (details to follow).<br>- Attach two policies to this user: one for `PassRole` and another for `EsHttpPut`. Create and attach the following policy:</p><pre>{<br> &quot;Version&quot;: &quot;2012–10–17&quot;,<br>   &quot;Statement&quot;: [<br>     {<br>       &quot;Effect&quot;: &quot;Allow&quot;,<br>       &quot;Action&quot;: &quot;iam:PassRole&quot;,<br>       &quot;Resource&quot;: &quot;arn:aws:iam::12345678:role/OpenSearchSnapshotRole&quot;<br>     },<br>     {<br>       &quot;Effect&quot;: &quot;Allow&quot;,<br>       &quot;Action&quot;: &quot;es:ESHttpPut&quot;,<br>       &quot;Resource&quot;: &quot;arn:aws:es:eu-central-1:12345678:domain/my-open-search-domain&quot;<br>     }<br>   ]<br> }</pre><h3>3. Create a New IAM Role and Policy</h3><p>- Create a new role for OpenSearch to access S3. This role will be used in the API request and will allow OpenSearch to access and create the repository. Let’s name this role `OpenSearchSnapshotRole`.</p><pre>arn:aws:iam::12345678:role/OpenSearchSnapshotRole</pre><p>- Attach a policy to this role with the necessary permissions to access S3. Here’s the policy JSON:</p><pre>{<br> &quot;Version&quot;: &quot;2012–10–17&quot;,<br> &quot;Statement&quot;: [<br>     {<br>     &quot;Effect&quot;: &quot;Allow&quot;,<br>     &quot;Action&quot;: [<br>     &quot;s3:PutObject&quot;,<br>     &quot;s3:GetObject&quot;,<br>     &quot;s3:DeleteObject&quot;,<br>     &quot;s3:ListBucket&quot;<br>     ],<br>       &quot;Resource&quot;: [<br>       &quot;arn:aws:s3:::open-search-backups&quot;,<br>       &quot;arn:aws:s3:::open-search-backups/*&quot;<br>       ]<br>     }<br>   ]<br> }</pre><h3>4. Map the OpenSearch Role with the AWS User</h3><ul><li>Map the IAM role within OpenSearch RBAC (Role-Based Access Control). <br>- Navigate to OpenSearch &gt; Security &gt; Roles &gt; manage-snapshot.<br>- Find the “map users” action and enter your IAM user’s ARN into the mapping field.</li></ul><p>- If this mapping is not done, you will encounter the following error:</p><pre>{<br> &quot;error&quot;: {<br>   &quot;root_cause&quot;: [<br>     {<br>       &quot;type&quot;: &quot;security_exception&quot;,<br>       &quot;reason&quot;: &quot;no permissions for [cluster:admin/repository/put] and User [name=arn:aws:iam::12345678:user/open-search-admin, backend_roles=[], requestedTenant=null]&quot;<br>       }<br>     ],<br>       &quot;type&quot;: &quot;security_exception&quot;,<br>       &quot;reason&quot;: &quot;no permissions for [cluster:admin/repository/put] and User [name=arn:aws:iam::12345687:user/open-search-admin, backend_roles=[], requestedTenant=null]&quot;<br>       },<br> &quot;status&quot;: 403<br> }</pre><h3>5. Run Your API Request</h3><p>- With all components set up, you can now add the new repository to S3 by making a PUT API call.<br>- Using Postman is recommended due to its support for AWS Signature authentication. Set the credentials for the user `open-search-admin` and configure the authorization as shown below:</p><p>- Ensure the service name is set to `es` (for Elasticsearch) and run the command.</p><pre>curl - location - request PUT &#39;https://my-open-search-domain.eu-central-1.es.amazonaws.com/_snapshot/aws-s3&#39; \<br> - header &#39;Content-Type: application/json&#39; \<br> - header &#39;X-Amz-Content-Sha256: 123456789123456789123456789&#39; \<br> - header &#39;X-Amz-Date: 20240525T114900Z&#39; \<br> - header &#39;Authorization: AWS4-HMAC-SHA256 Credential=BAC123ABC123BAC123ABC123/20240525/eu-central-1/es/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=123123123123123123123123132&#39; \<br> - data &#39;{<br> &quot;type&quot;: &quot;s3&quot;,<br> &quot;settings&quot;: {<br> &quot;bucket&quot;: &quot;open-search-backups&quot;,<br> &quot;base_path&quot;: &quot;a&quot;,<br> &quot;region&quot;: &quot;eu-central-1&quot;,<br> &quot;role_arn&quot;: &quot;arn:aws:iam::12345678:role/OpenSearchSnapshotRole&quot;<br> }<br> }&#39;</pre><p>- If everything is configured correctly, you should receive the following response:</p><pre>{<br> &quot;acknowledged&quot;: true<br> }</pre><p>- You can now see your newly created snapshot repository under OpenSearch.</p><p>With this setup, you can take new manual snapshots in OpenSearch and store them in your specified S3 bucket.</p><p><em>If you need, you can delete a mistakenly create repository like below:</em></p><pre>curl --location --request DELETE &#39;https://open-search-domain.eu-central-1.es.amazonaws.com/_snapshot/failed-name-aws-s3&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--header &#39;X-Amz-Date: 20240525T131714Z&#39; \<br>--header &#39;Authorization: AWS4-HMAC-SHA256 Credential=ABC123ABC123ABC123/20240525/eu-central-1/es/aws4_request, SignedHeaders=host;x-amz-date, Signature=123123123123123123123123123123&#39; \<br>--data &#39;&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=222948edd2e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Restricting Namespace Access in AWS EKS: A Guide to Roles and Bindings]]></title>
            <link>https://medium.com/@fyarbasi/restricting-namespace-access-in-aws-eks-a-guide-to-roles-and-bindings-8e77b1dbbfd9?source=rss-8429e585f741------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e77b1dbbfd9</guid>
            <category><![CDATA[iam-policy]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[rbac]]></category>
            <dc:creator><![CDATA[Fatih Yarbaşı]]></dc:creator>
            <pubDate>Thu, 22 Feb 2024 12:30:43 GMT</pubDate>
            <atom:updated>2024-02-22T12:30:43.513Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nGHTNmuQzK1g4BhafM0dog.jpeg" /></figure><p>This guide delves into the nuances of creating a role that not only allows for specific interactions within a designated namespace but also encompasses a deletion capability, all within the AWS EKS framework.</p><p>In addition to the traditional method of using the aws-auth ConfigMap for access management, it’s important to acknowledge the advent of a more modern approach to EKS API access management. This newer method offers enhanced flexibility and security features. However, for the purposes of this guide, we focus on the aws-auth ConfigMap approach due to its wide compatibility and the ease of integration it offers, especially for systems that leverage older configurations or require a more straightforward migration path.</p><p><strong>The Pillars of Kubernetes Access Control</strong></p><p>Access control in Kubernetes is governed by four primary objects: Roles, ClusterRoles, RoleBindings, and ClusterRoleBindings.</p><p>- <strong>Roles </strong>define permissions within a specific namespace, catering to users who need to perform a limited set of actions on certain resources.</p><p>- <strong>ClusterRoles</strong> extend these permissions across all namespaces in the cluster, suitable for roles requiring broad access.</p><p>- <strong>RoleBindings</strong> apply the permissions defined in a Role to a user or group within a specific namespace.</p><p>- <strong>ClusterRoleBindings</strong> allow the permissions in a ClusterRole to be granted to users or groups across the entire cluster.</p><p><strong>Step 1: Establish a New IAM Role</strong></p><p>Initiate the process by creating a new IAM role or user within the AWS console, tailored for interaction with your Kubernetes cluster.</p><p><strong>Step 2: Group Assignment and Policy Attachment</strong></p><p>Assign the new IAM entity to a group that possesses the “EKS Describe Policy,” enabling visibility into the cluster’s configurations without permitting modifications. An exemplar policy might resemble:</p><pre>{<br> “Version”: “2012–10–17”,<br> “Statement”: [<br> {<br> “Effect”: “Allow”,<br> “Action”: “eks:DescribeCluster”,<br> “Resource”: “arn:aws:eks:*:*:cluster/*”<br> }<br> ]<br>}<br></pre><p><strong>Step 3: Role Definition within Kubernetes</strong></p><p>Construct a Role in Kubernetes to outline permissible actions within the specified namespace. Below is a comprehensive Role YAML example:</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: Role<br>metadata:<br> name: new-role<br> namespace: test<br>rules:<br> — verbs: [get, watch, list, delete]<br> apiGroups: [“”]<br> resources: [pods]</pre><p><strong>Step 4: RoleBinding Creation</strong></p><p>Through a RoleBinding, connect the defined Role to the intended user or group, applying the defined permissions within the namespace. Here is the RoleBinding YAML configuration:</p><pre><br>apiVersion: rbac.authorization.k8s.io/v1<br>kind: RoleBinding<br>metadata:<br> name: new-role-binding<br> namespace: staging<br>subjects:<br>- kind: Group<br> name: new-role-group<br> apiGroup: rbac.authorization.k8s.io<br>roleRef:<br> kind: Role<br> name: new-role<br> apiGroup: rbac.authorization.k8s.io</pre><p><strong>Step 5: Updating the aws-auth ConfigMap</strong></p><p>Finally, integrate the new IAM role or user into the Kubernetes environment by updating the aws-auth ConfigMap. This step is critical for ensuring the IAM entity is recognized within the cluster, as shown in the following configuration snippet:</p><pre>mapUsers: |<br> — userarn: arn:aws:iam::YOUR_AWS_ACCOUNT_ID:user/YOUR_USER_NAME<br> username: YOUR_USER_NAME<br> groups:<br> — new-role-group</pre><p>While this guide employs the aws-auth ConfigMap due to its backward compatibility and straightforward application, it’s worth noting the existence of a more modern EKS API access management approach. This newer method, although not covered here, provides an alternative for administrators seeking additional capabilities and enhanced security mechanisms.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e77b1dbbfd9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solving the Mystery of Disappearing SSL Certificates in AWS EKS with a Classic LoadBalancer]]></title>
            <link>https://medium.com/@fyarbasi/solving-the-mystery-of-disappearing-ssl-certificates-in-aws-eks-with-a-classic-loadbalancer-64654c72c238?source=rss-8429e585f741------2</link>
            <guid isPermaLink="false">https://medium.com/p/64654c72c238</guid>
            <category><![CDATA[nginx-ingress-controller]]></category>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[aws-eks]]></category>
            <dc:creator><![CDATA[Fatih Yarbaşı]]></dc:creator>
            <pubDate>Sun, 04 Feb 2024 23:07:41 GMT</pubDate>
            <atom:updated>2024-02-04T23:09:09.192Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A digital illustration depicting a detective, magnifying glass in hand, closely inspecting a node labeled ‘SSL Certificate’ within a complex network representing a Kubernetes cluster. The background features faint AWS logos and a classic LoadBalancer, set against a dark, mysterious ambiance to emphasize the detective’s investigation into technical cloud environment issues." src="https://cdn-images-1.medium.com/max/1024/1*bbxu0g3YiohT8kbucj-rEg.jpeg" /></figure><p>Navigating the complexities of Kubernetes can sometimes feel like unraveling a mystery. Recently, I encountered a disappearing SSL certificate issue within my AWS Elastic Kubernetes Service (EKS) environment that had me puzzled for quite some time.</p><h3>The Environment</h3><p>Before diving into the issue and its resolution, let’s set the stage with an overview of the environment:</p><ul><li>Cloud Provider: AWS (Amazon Web Services)</li><li>Service: EKS (Elastic Kubernetes Service)</li><li>Load Balancer: Classic LoadBalancer</li><li>Ingress Controller: NGINX, deployed using Helm</li></ul><p>This setup is fairly common among Kubernetes users who leverage AWS for cloud services. The NGINX ingress controller, managed through Helm, simplifies the process of exposing services to the internet.</p><h3>The Disappearing SSL Certificates</h3><p>The core of the problem was with the SSL certificates attached to the LoadBalancer, which were vanishing regularly. This issue led to downtime and the manual reattachment of public AWS SSL certificates via the AWS Console — a far from ideal solution that was both time-consuming and error-prone.</p><p>After much investigation, the root cause was identified: the LoadBalancer Service configuration was not correctly maintaining the SSL certificate information, leading to its disappearance upon certain updates or configurations changes.</p><h3>The Resolution</h3><p>The breakthrough came when I discovered that by adding specific annotations to my LoadBalancer Service configuration, I could ensure the persistence of the SSL certificate. Here’s what needed to be added:</p><pre>annotations:<br>  service.beta.kubernetes.io/aws-load-balancer-ssl-cert: &gt;-<br>    arn:aws:acm:eu-central-1:*************:certificate/********************<br>  service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https</pre><p>These annotations explicitly tell the AWS Cloud Provider integration to use the specified ACM (AWS Certificate Manager) certificate for the HTTPS ports on the LoadBalancer. This solution is elegant in its simplicity yet powerful in its effect, ensuring the SSL certificate remains attached without the need for manual intervention.</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: nginx-controller-nginx-ingress-controller<br>  namespace: ingress-nginx<br>  annotations:<br>    service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: &#39;*&#39;<br>    service.beta.kubernetes.io/aws-load-balancer-ssl-cert: &gt;-<br>      arn:aws:acm:eu-central-1:**************:certificate/*************<br>    service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https<br>spec:<br>  ports:<br>    - name: http<br>      protocol: TCP<br>      port: 80<br>      targetPort: http<br>    - name: https<br>      protocol: TCP<br>      port: 443<br>      targetPort: http<br>  type: LoadBalancer<br>  selector:<br>    app.kubernetes.io/component: controller<br>    app.kubernetes.io/instance: nginx-controller<br>    app.kubernetes.io/name: nginx-ingress-controller</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64654c72c238" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enabling Proxy Protocol with NGINX Ingress Controller on AWS EKS]]></title>
            <link>https://medium.com/@fyarbasi/enabling-proxy-protocol-with-nginx-ingress-controller-on-aws-eks-91b51800328f?source=rss-8429e585f741------2</link>
            <guid isPermaLink="false">https://medium.com/p/91b51800328f</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[client-ip]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[nginx-ingress-controller]]></category>
            <category><![CDATA[proxy-protocol]]></category>
            <dc:creator><![CDATA[Fatih Yarbaşı]]></dc:creator>
            <pubDate>Sun, 04 Feb 2024 22:43:12 GMT</pubDate>
            <atom:updated>2024-02-04T22:43:12.590Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="This image illustrates the setup of the NGINX Ingress Controller on AWS EKS with Proxy Protocol, showing a simplified AWS EKS cluster connected to a Classic Load Balancer and the NGINX logo." src="https://cdn-images-1.medium.com/max/1024/1*0ZSRTKW4tmOvZcHo4vXwjQ.jpeg" /></figure><p>This guide provides a comprehensive walkthrough on how to achieve preserving the real client IP address while handling inbound traffic by leveraging the Proxy Protocol on an AWS EC2 Classic Load Balancer, managed through an NGINX Ingress Controller.</p><h3>Introduction</h3><p>The Proxy Protocol was designed to chain proxies / load balancers without losing the client’s original IP address. When using AWS Elastic Kubernetes Service (EKS) with an NGINX Ingress Controller, the client’s IP address is typically replaced by the internal IP address of the load balancer. This can obscure client traffic origins, impacting analytics and security measures. This guide will demonstrate how to configure your AWS EKS cluster to preserve client IP information accurately.</p><h3>Prerequisites</h3><ul><li>An AWS EKS cluster up and running.</li><li>NGINX Ingress Controller deployed in your EKS cluster.</li><li>Basic familiarity with Kubernetes resource configuration (YAML files).</li><li>kubectl, the Kubernetes command-line tool, configured to communicate with your cluster.</li></ul><h3>Step 1: Configure the NGINX Load Balancer Service</h3><p>The first step involves annotating the NGINX Load Balancer Service to enable the Proxy Protocol.</p><p>Locate your NGINX Load Balancer Service YAML file (service.yaml), and add the following annotation under the metadata section:</p><pre>metadata:<br>  annotations:<br>    service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: &#39;*&#39;</pre><p>This annotation instructs AWS to enable Proxy Protocol support across all connections managed by the Load Balancer.</p><h3>Step 2: Update the NGINX Ingress Controller ConfigMap</h3><p>Next, you’ll need to ensure that the NGINX Ingress Controller is configured to use the Proxy Protocol. This involves modifying the ConfigMap associated with your Ingress Controller to parse the Proxy Protocol header.</p><p>Create or update the ConfigMap for the NGINX Ingress Controller as follows:</p><pre>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: nginx-controller-nginx-ingress-controller<br>  namespace: ingress-nginx<br>data:<br>  use-proxy-protocol: &quot;true&quot;</pre><p>Ensure the use-proxy-protocol flag is set to &quot;true&quot; under the data section. This configuration enables the NGINX Ingress Controller to understand and use the client IP address transmitted by the Proxy Protocol header.</p><h3>Step 3: Restart NGINX Ingress Controller Pods</h3><p>For the changes to take effect, you must restart the NGINX Ingress Controller pods. This can be safely done by deleting the current pods, causing the deployment to spawn new ones with the updated configuration:</p><pre>kubectl delete pods -l app.kubernetes.io/name=nginx-ingress-controller -n ingress-nginx</pre><h3>Conclusion</h3><p>By following these steps, you’ve successfully configured your AWS EKS cluster to use the Proxy Protocol with the NGINX Ingress Controller. This setup ensures that the real client IP addresses are preserved and accurately reported by your applications, enhancing your ability to monitor, secure, and analyze your traffic.</p><p>Remember, direct modifications to the EC2 Load Balancer through the AWS Management Console are discouraged. Instead, manage your Load Balancer configurations through Kubernetes resources to ensure consistency, version control, and automation compatibility.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91b51800328f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to give unsolicited feedback in software teams]]></title>
            <link>https://medium.com/@fyarbasi/how-to-give-unsolicited-feedback-in-software-teams-9431d59c8a44?source=rss-8429e585f741------2</link>
            <guid isPermaLink="false">https://medium.com/p/9431d59c8a44</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[agile]]></category>
            <dc:creator><![CDATA[Fatih Yarbaşı]]></dc:creator>
            <pubDate>Wed, 22 Mar 2023 11:43:11 GMT</pubDate>
            <atom:updated>2023-03-22T11:43:11.272Z</atom:updated>
            <content:encoded><![CDATA[<p>I have had many occasions in my professional life where I’ve struggled to provide unsolicited feedback to my peers or subordinates.</p><p>As a software engineer, I used to avoid giving direct, unsolicited feedback to my peers because I was uncertain about how they would react. However, as I progressed to an engineering manager, I began to feel uneasy, particularly during performance reviews.</p><p><strong>If you’ve experienced similar feelings, please know that it’s completely normal and you shouldn’t expect yourself to be an expert at giving feedback at the beginning of your career.</strong></p><p>Even when I followed the process and provided unsolicited feedback according to the book, I found that it often didn’t work. Most of the time, the receiver disagreed and had no intention of being convinced. It’s really difficult to change people. So don’t blame yourself, embrace the challenge and work on it.</p><p><strong>Why you should figure out a way to get over that fear?</strong></p><p>When you get more senior you need to be more capable of giving feedback. It is an expected skillset in the software development organizations particularly in managerial positions.</p><p>Remember, giving and receiving critical feedback is a mutual action plan for both the manager and the receiver. When you give your colleague constructive feedback, you’re giving them a chance to reflect on their situation. Otherwise, they may not be aware of their shortcomings, and in the event of a parting of ways, the last thing you want to hear from your subordinates is, “why didn’t you tell me?”</p><p><strong>What about forming a quality feedback as a peer?</strong></p><p>Here is a good example that would be used if you are not in a management role of the person, you are not their supervisor and you are not responsible for them:</p><blockquote><em>I care about you and I am going to share some behaviors of you that might be harming you. I can definitely understand you may not agree with that. If you are not agree or you won’t take any actions that is your call and I am not gonna be upset. I want you to know that in your best interest I’m sharing this with you.</em></blockquote><p>The phrases I provided are just a template, and you can customize them to fit your context and situation. It’s important to remember that the feedback you give is ultimately up to the receiver to evaluate and act upon.</p><p>So don’t hesitate to share helpful information with your peers, as it could be beneficial for them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9431d59c8a44" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Card Payment Systems : Past, Today and Models]]></title>
            <link>https://medium.com/@fyarbasi/card-payment-systems-past-today-and-models-1f7935136341?source=rss-8429e585f741------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f7935136341</guid>
            <category><![CDATA[cards]]></category>
            <category><![CDATA[credit-cards]]></category>
            <category><![CDATA[acquiring]]></category>
            <category><![CDATA[issuing]]></category>
            <category><![CDATA[payments]]></category>
            <dc:creator><![CDATA[Fatih Yarbaşı]]></dc:creator>
            <pubDate>Thu, 02 Mar 2023 13:51:50 GMT</pubDate>
            <atom:updated>2023-03-02T13:53:07.771Z</atom:updated>
            <content:encoded><![CDATA[<h3>Card Payment Systems : Past, Today and Models</h3><p>I will focus on card payment systems that is the most widely used payment method which emerged as an alternative to cash payment.</p><p>Whether or not card payment systems will lose its throne in the future is highly debated. I will examine the history of card payment systems, which have strengthened its place in the world for the last 70 years, and the models used as publications today.</p><p>From here it may also be possible to look into the future and predict where we might go next.</p><h3>Development of card payment systems</h3><p>Firstly, let’s have a look at the past, the idea of being able to pay without cash dates back to the 1800s! For the first time in history, in Edward Bellamy’s novel “Looking Backward 2000”, published in 1888, Bellamy used the word “credit card” in 11 different places.</p><p>The first card infrastructure, which became a payment system, was created by Diners Club in 1950. The idea for Diners Club came about when founder Frank X. McNamara realized that he forgot his wallet after eating at a restaurant one day. His wife paid the bill, and at that moment Frank came up with a multi-purpose card, aiming to establish a structure that would ensure that such an embarrassing situation would not happen again.</p><p>The next day, he met with the restaurant owner, and the process that enabled the first card and payment system in history began. This is considered the basis of the first card payment systems in history.</p><p>Except for Diners Club, in 1958 Bank of America issued the first credit card. While Bank of America cards have come to the present day with the VISA brand, the MasterCard brand was formed in 1966 under the Interbank Card Association (ICA) licensors association, which was formed by other banks that did not want to be involved in the formation of VISA.</p><p>Card payment systems, which were first used in banking, later began to be used in many different areas. Hotels, schools, meal card companies, hospitals, etc. Card payment systems have spread in many different areas and have come to this day.</p><h3>Models and main players of card payment systems</h3><p>In prepaid cards, the balance in the card is preloaded and then spent. Bank account cards and meal cards we know can be examples of these prepaid cards. Credit cards, on the other hand, allow you to spend money that has not been pre-loaded into it. In other words, the card user makes the shopping beforehand and pays the debt written to him from behind on the cut-off date.</p><p>The basic concepts have been accepted as “acquiring” (accepting cards) and “issuing” (card printing). Similarly, organizations that issue the card are called “issuers”, while organizations that distribute the devices, software or systems (for example, POS devices) that accept the card to the members are called “acquirer”.</p><p>Acquirer organizations usually leave POS devices to their member merchants in return for a contract. Although there have been changes in the concept of POS device ownership with the changing laws recently, this is the general approach. The definition of member merchant can be considered as commercial establishments that sell with all cards. An organization can be an “issuer” or an “acquirer”. Generally, banks offer card service in both “acquirer” and “issuer” formats.</p><h4>Two-Sided Card Systems</h4><p>In this system, the institution that issues the card and the institution that accepts the card are the same institution. In other words, the card issuer distributes cards only to its customers. Users using this card can only spend at workplaces belonging to the same organization. Since there are two parties, the cardholder who spends and the member who provides the service, the name of the system is two-sided card system.</p><p>The main purpose of issuing such cards is to give users the opportunity to spend cashless and connect users to their own organizations. While these institutions previously provided their customers with a pre-financing opportunity on credit or in installments, today they provide the addiction with a card.</p><h4>Three-Sided Card Systems</h4><p>The model used in the Diners Club example, which is accepted as the basis of card systems, is the three-sided card system model. In this model, the commercial enterprise does not issue cards directly, but issuing the cards by specialized institutions. For example, banks are among the institutions specialized in this field. The purpose of this system is that issued cards are valid in a member network. Thus, the member network can be expanded and a more efficient system is created in which alternatives are multiplied for both the card issuer and the customers</p><p>In the three-sided system, the card issuer undertakes the risk by guaranteeing the member merchant to pay the expenses incurred by the customer. In this system, the cardholder can use his card in all workplaces that make a card acceptance agreement.</p><p>In the system, the institutions that issue the card have two basic functions. The first is to sign a membership agreement with businesses operating commercially. The second function is to issue cards to customers with whom it has signed a card contract and to offer shopping with a card. The most valid method for the card customer to understand in which member merchants his card was issued is to use the same logo on the card and in member merchants.</p><p>In this system, member businesses are under the obligation to sell products or provide services against card issuers without demanding cash from the card customer. The card issuer pays the amount owed on behalf of the card customer to the merchant. The issuing institution collects the amount paid from the card customer later in the period.</p><p>As a result, the difference of the three-sided system from the two-sided system is that there are 3 main players: the card customer, the member merchant and the organization that issues the card. Success in this system is only possible if all 3 players get sufficient performance from the system. If any of the 3 players is not satisfied with this system, it is not possible for the system to work.</p><h4>Extended (Featured) Three-sided Card Systems</h4><p>The extended three-sided system is formed by the inclusion of a fourth party. Today’s bank credit cards can be given as an example to these systems. Instead of issuing credit cards themselves, banks offer credit cards of international credit card companies to their customers. Thus, they offer a card that can be used not only in the member workplaces of that bank, but also universally all over the world. Credit card companies are international organizations that have the authority to print credit cards and use their logos. These organizations are called licensors. Examples of licensors include companies such as Visa, Master Card, and American Express. Thus, on the credit card printed and given to the customer, not only the bank’s information, but also the information of the licensor (logo, etc.) is displayed.</p><p>There are basically five parties in the operation of the expanded tripartite system.</p><p>· Card customer (person or institution that spends with the card),<br>· Bank or organization authorized to issue a licensed card — Issuer (Bank X, Bank Y etc.),<br>· Licensing credit card company, licensor (Visa, Master Card, AmEx etc.),<br>· Other banks that have signed a contract with the same merchant — Acquirer (Bank X, Bank Y etc.),<br>· Member workplaces (The workplaces that have signed a member workplace agreement with the bank and accept the card of the card customer at their own workplace)</p><h4>Process Flow</h4><p><em>Below process flow depicts the process in Turkey</em></p><p>(1) By signing a contract with Bank X, Master Card, the bank gets the authority to issue credit cards,<br>(2) Ms. A, who wants to get a credit card from bank X, signs a contract with bank X,<br>(3) The travel agency selling the flight ticket signs a membership agreement with both banks in order to accept payments through both X and Y banks,<br>(4) Bank X delivers the credit card to Ms. A,<br>(5) Ms. A buys the flight ticket from the airline agency,<br>(6) Ms. A states that she wants to make this purchase with a card with the MasterCard logo of bank X,<br>(7) Agency passes the payment through the POS device of Y bank, the related transaction is controlled and authorized by Interbank Card Center authority systems by going through the POS,<br>(8) Records credits up to the transaction amount for the member merchant in Y bank accounts,<br>(9) The transaction related to the same expenditure is recorded in the clearing center records by the Y bank,<br>(10) Clearing house notifies the related transaction to bank X, which is the card issuer,<br>(11) The next day, the payment is made to the Interbank clearinghouse by Bank X,<br>(12) This payment made by deducting the swap commission is then paid to bank Y,<br>(13) Bank X issuing the card at the end of the period sends an account statement to collect the fee of the relevant transaction from the card customer,<br>(14) Card customer Ms. A makes the payment of the balance declared with the account statement sheet.</p><p>As a result, the difference between the three-party system and the two-sided system is that the organization that issues the card and the organization that sells the product or service are different. There are at least three sides of the system: the card holder, the member merchant and the organization that issues the card to the market. In the expanded three-sided system, there are card manufacturer licensing companies and the cards that these companies are intermediary with are cards that can be accepted all over the world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f7935136341" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Improve Your Ability to Not Take Code Review Feedback Personally]]></title>
            <link>https://medium.com/@fyarbasi/how-to-improve-your-ability-to-not-take-code-review-feedback-personally-4cc9e58e93c5?source=rss-8429e585f741------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cc9e58e93c5</guid>
            <category><![CDATA[pull-request]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[feedback]]></category>
            <dc:creator><![CDATA[Fatih Yarbaşı]]></dc:creator>
            <pubDate>Thu, 02 Mar 2023 13:29:54 GMT</pubDate>
            <atom:updated>2023-03-02T16:23:51.112Z</atom:updated>
            <content:encoded><![CDATA[<p>If you get the feeling of “no, not this person again” on your PR code reviews, I don’t think you are alone🙂</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6zksG1_HyUtJYbFhuZ5JCg.jpeg" /></figure><p>In software development, you may find yourself having a difficult time dealing with code review feedback from some of your colleagues. If you become confrontational and are not mentally prepared for the comments, it may prevent you from extracting the useful core of the feedback and ignoring the rest.</p><p>Let me give you some quick tips…</p><h3>Embrace it — code reviews can be tough to deal with</h3><p>I can’t think of any other industry or profession that has a similar process where, over the course of your career, you’ll confront reviews from your peers continuously.</p><p>It’s a unique and challenging aspect of software development that we should keep in mind. It’s not always easy to feel questioned especially when you’ve put a lot of effort into it.</p><p>Embracing the challenge and tiring nature of code reviews is essential for becoming a better developer and producing software that meets the needs of users.</p><p>Never forget the important outcome of your code. Value for the customer &amp; end-user. Don&#39;t get sidetracked by review comments and dont focus too much to go to the production with the code you pushed.</p><h3>Not every feedback has the same importance, having a guideline is crucial</h3><p>Since we are running the PR code review process on behalf of our organizations, I do believe, organizations need to provide a healthy framework to rank the importance of each feedback on code reviews.</p><p>For example, asking for a change for a variable name from “x” to “y” can not have the same importance with a huge design pitfall. So rewiers can categorize their feedbacks and you can focus on the really important ones or at least you don&#39;t feel overwhelmed for each comment at same level. Lets say, even if the reviewers don’t follow the ranking correctly, having a guideline can help to visualize the categories and ranks and this becomes an argument for you.</p><p>This guideline needs to be prepared by the accordance of engineering manager, so this is a company thing. You just need to push and suggest it.</p><h3>Don’t be misled by the tone of feedback</h3><p>Sometimes the tone of the feedback may make you think it is extremly important and need to be fixed immediately. But when you look at the actual recommendation by removing the tone, you can find yourself saying, it is not actually right or it is not that important!</p><p>Unfortunately, I’ve seen lots of feedback written with an overly strong language without even trying the suggested recommendation. You may see this type of feedback especially in regards to performance of the code or stylistic choice. What I expect in that situations, having some sort of benchmarking or testing or at least a document, article reference about it. But as I said I’ve seen limited attempts to prove the recommendation to you so these are for me just waste of time and lazy suggestions.</p><p>So breathe first and try to reach the core.</p><h3>Having a thick skin might be a very beneficiary skill for developers</h3><p>Over the course of years I’ve seen examples that communication styles of the people who reviews the code might be a bit different and you should learn not to take those feedback as daggers to your heart. This thick skin will be very important for you and I think as a software delveoper you will benefit from it a lot.</p><p>Don’t forget, as a receiver of the feedback, you have the right to expect from the reviewer invest the time to communicate the importance of their feedback also.</p><p>If you don&#39;t feel you get it, then explicitly ask them and try to understand. You can always ask; Do you really think it is important? Should we block PR deploying until this is addressed? What about shipping the code as is and having another PR for the fixation? Don&#39;t focus to the questions, they may not be correct for every organization, here I am asking you to start an explicit conversation with the reviewers to make them take the responsibility of it.</p><p>Final words, you can’t change other people. So improve your skills to get the core of the PR code reviews and try to turn them into constructive feedback with above recommendations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cc9e58e93c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>