<?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 Vinay Damle on Medium]]></title>
        <description><![CDATA[Stories by Vinay Damle on Medium]]></description>
        <link>https://medium.com/@damlevinay?source=rss-ebd99c72cb4d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4jqXjAutUuT6xhOfkU31pA.jpeg</url>
            <title>Stories by Vinay Damle on Medium</title>
            <link>https://medium.com/@damlevinay?source=rss-ebd99c72cb4d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 04:29:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@damlevinay/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[Migrating CFCR (PKS) Workloads to Google Kubernetes Engine (GKE): A Comprehensive Guide]]></title>
            <link>https://medium.com/@damlevinay/migrating-cfcr-pks-workloads-to-google-kubernetes-engine-gke-a-comprehensive-guide-28226b0ae9a7?source=rss-ebd99c72cb4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/28226b0ae9a7</guid>
            <dc:creator><![CDATA[Vinay Damle]]></dc:creator>
            <pubDate>Mon, 17 Nov 2025 06:59:14 GMT</pubDate>
            <atom:updated>2025-11-17T08:11:52.543Z</atom:updated>
            <content:encoded><![CDATA[<p>Cloud Foundry Container Runtime (CFCR), also known as Pivotal Container Service (PKS), provided a reliable way to deploy and manage Kubernetes on-premises or in private clouds. As organizations shift towards fully managed, modern cloud infrastructure, migrating these workloads to Google Kubernetes Engine (GKE) offers significant benefits, including simplified operations, enhanced scalability, and seamless integration with Google Cloud services like Cloud SQL</p><p>The blog provides a detailed, step-by-step approach to successfully migrate diverse CFCR workloads; including frontend, backend, stateless, and stateful applications to a secure and optimized GKE environment</p><h3>1. Initial Assessment and Planning</h3><p>Before starting the migration, a thorough assessment of existing CFCR environment is essential</p><h3>1.1 Workload Inventory and Dependencies</h3><p>Create a detailed inventory of all applications, noting their type and dependencies. This involves cataloging all running services, identifying their architectural patterns (e.g., microservices, monoliths), and mapping out their interconnections and external service dependencies. A comprehensive inventory ensures that no critical components are overlooked during the migration planning phase. For example, a web application might depend on a database, a caching layer, and an external payment gateway</p><p>A good reference for understanding application dependencies in a Kubernetes environment can be found in the <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/object-management/">Kubernetes Object Management</a>, which details how different resources relate to each other</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*8RmHHb4VtUdGK-H_GLtbbQ.png" /></figure><h3>1.2 Resource and Configuration Extraction</h3><p>Extract critical configuration details from CFCR manifests and BOSH deployments. The step is crucial for recreating the environment accurately in GKE. There is a need to identify and capture configurations related to application deployments, networking, persistent storage, and secret management. For example, “kubectl get deployments -o yaml” might be used to extract Kubernetes deployment manifests.</p><p>For comprehensive guidance on extracting Kubernetes resource configurations, refer to the <a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/">Kubectl Cheatsheet</a> in the official Kubernetes documentation.</p><ul><li><strong>Kubernetes Manifests:</strong> Capture all Deployment, Service, ConfigMap, Secret, StatefulSet, and PersistentVolumeClaim definitions. These manifests will form the basis of deployments in GKE</li><li><strong>Networking:</strong> Document existing Ingress/Egress rules, Service types, and network policies. This includes understanding how traffic enters and leaves CFCR environment and how internal services communicate</li><li><strong>Persistent Storage:</strong> Identify storage classes and the volume sizes for all stateful applications. This is crucial for ensuring data persistence and integrity during and after migration</li><li><strong>Secrets Management:</strong> Document how sensitive data (database credentials, API keys) is currently managed. This is vital for maintaining security and compliance in the new GKE environment</li></ul><h3>1.3 Leveraging GenAI for Configuration Translation</h3><p>Generative AI can significantly accelerate the extraction and initial translation of CFCR configurations into GKE-compatible Kubernetes manifests like <a href="https://gemini.google.com/corp/app">Gemini</a></p><ol><li><strong>AI-Assisted Manifest Generation:</strong></li></ol><ul><li><strong>Input:</strong> Provide the AI model with existing CFCR/PKS manifest YAMLs, deployment manifests, or configuration files (e.g., properties from CFCR releases)</li><li><strong>Prompt/Task:</strong> Instruct the GenAI model (e.g., a large language model trained on Kubernetes best practices) to “Convert this CFCR Kubernetes YAML to a GKE-optimized Kubernetes manifest, incorporating best practices for Workload Identity annotation and GCP service references (e.g., Cloud SQL).”</li><li><strong>Output:</strong> Receive a draft GKE-ready manifest, including updated labels, annotations, and resource references</li></ul><p><strong>2. Configuration Parameter Mapping:</strong></p><ul><li><strong>Input:</strong> Feed the AI tables or lists of key configuration parameters used in BOSH deployments (e.g., disk sizes, environment variables, security groups)</li><li><strong>Prompt/Task:</strong> Ask the AI to “Map the BOSH configuration parameters (e.g., instance_type, persistent_disk) to their corresponding GKE resource configuration fields (e.g., machineType, storageClassName, resource limits).”</li><li><strong>Output:</strong> A mapping table that streamlines the manual resource extraction and sizing steps</li></ul><h3>1.4 Target GKE Cluster Design</h3><p>Design target GKE cluster infrastructure. This involves making decisions about cluster type, networking, security, scaling, and storage to align with application requirements and organizational policies. For example, deciding between a regional or zonal cluster, or Autopilot versus Standard mode, will impact high availability, cost, and operational complexity</p><p>The <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/types-of-clusters">GKE Documentation on Cluster Architecture</a> provides valuable insights into different cluster types and their use cases</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*_yjvxV4sPNaj7rAJYYYKfg.png" /></figure><h3>2. Infrastructure Setup in Google Cloud</h3><h3>2.1 Set up GKE and Networking</h3><ol><li><strong>VPC and Subnets:</strong> Ensure VPC network is set up, ideally using a private network configuration for GKE nodes. This involves creating a custom mode VPC network and subnets that will host GKE cluster nodes. Using a private network enhances security by keeping node IP addresses internal. For detailed steps on setting up a VPC and subnets, refer to the <a href="https://cloud.google.com/vpc/docs/vpc">Google Cloud VPC</a></li><li><strong>GKE Cluster Creation:</strong> Create the GKE cluster, enabling key features like <strong>Workload Identity</strong> and <strong>GKE Network Policy Enforcement</strong>. <strong>Workload Identity</strong> allows GKE service accounts to act as Google service accounts, enabling fine-grained, secure access to Google Cloud services. <strong>GKE Network Policy Enforcement</strong> provides cluster-level firewall rules for pods, allowing to control network traffic flow between them. To learn more about creating GKE clusters and enabling these features, consult the <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster">GKE cluster creation</a>, the <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity">Workload Identity</a>, and the <a href="https://docs.cloud.google.com/kubernetes-engine/docs/tutorials/network-policy">GKE Network Policy</a></li></ol><pre>gcloud container clusters create cfcr-migration-cluster \<br>    --region=us-central1 \<br>    --release-channel=stable \<br>    --enable-workload-identity \<br>    --enable-network-policy \<br>    --machine-type=e2-standard-4</pre><h3>2.2 Cloud SQL Integration (Database)</h3><p>Establish secure connectivity between GKE and Cloud SQL.</p><ol><li><strong>Provision Cloud SQL:</strong> Create a Cloud SQL instance (PostgreSQL, MySQL, or SQL Server) within Google Cloud project. For detailed steps, refer to the <a href="https://cloud.google.com/sql/docs/introduction">Cloud SQL</a></li><li><strong>Private IP Configuration:</strong> Configure Cloud SQL to use <strong>Private IP</strong> networking within Virtual Private Cloud (VPC) to ensure secure, low-latency connections without requiring a public IP address. This enhances security by keeping traffic within Google’s network. Learn more about configuring <a href="https://docs.cloud.google.com/sql/docs/mysql/private-ip">Private IP for Cloud SQL</a></li><li><strong>Workload Identity Setup:</strong> Workload Identity allows GKE applications to act as Google Service Accounts (GSAs) to access Google Cloud services. This eliminates the need to store and manage Kubernetes secrets for service account keys</li></ol><ul><li>Create a Google Service Account (GSA) for database access (e.g., db-connector@project-id.iam.gserviceaccount.com). This GSA will be used by GKE application to connect to Cloud SQL</li><li>Grant the GSA the necessary IAM roles for Cloud SQL access (e.g., roles/cloudsql.client). The `cloudsql.client` role allows the GSA to connect to Cloud SQL instances. For a comprehensive list of Cloud SQL IAM roles, refer to the <a href="https://cloud.google.com/sql/docs/mysql/iam-roles">Cloud SQL IAM</a></li><li>Bind the Kubernetes Service Account (KSA) that application pods will use (e.g., app-ksa in the namespace backend) to the GSA. This binding enables the GKE application to impersonate the GSA and utilize its permissions to access Cloud SQL. Detailed instructions on configuring Workload Identity can be found in the <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity">GKE Workload Identity</a></li></ul><pre>gcloud iam service-accounts create db-connector<br>gcloud projects add-iam-policy-binding &lt;project-id&gt; \<br>    --member=&quot;serviceAccount:db-connector@&lt;project-id&gt;.iam.gserviceaccount.com&quot; \<br>    --role=&quot;roles/cloudsql.client&quot;<br>gcloud iam service-accounts add-iam-policy-binding \<br>    db-connector@&lt;project-id&gt;.iam.gserviceaccount.com \<br>    --role=roles/iam.workloadIdentityUser \<br>    --member=&quot;serviceAccount:&lt;project-id&gt;.svc.id.goog[backend/app-ksa]&quot;</pre><h3>3. Workload Migration and Securing Communication</h3><h3>3.1 Stateless Workload Migration (Frontend/Backend)</h3><ol><li><strong>Manifest Adaptation:</strong> Review and adapt CFCR Kubernetes manifests for GKE. Pay special attention to:</li></ol><ul><li><strong>Image Registries:</strong> Update image pulls to use Artifact Registry or Google Container Registry (GCR). For more details, refer to the <a href="https://cloud.google.com/artifact-registry/docs/overview">Google Artifact Registry</a></li><li><strong>Resource Requests/Limits:</strong> Fine-tune resource settings based on GKE node sizing. Consult the <a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/">Kubernetes Managing Resources</a> for containers</li><li><strong>Workload Identity:</strong> Annotate the applications ServiceAccount to enable Workload Identity for Cloud SQL access. For comprehensive information, see the <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity">GKE Workload Identity</a></li></ul><pre>Example: ServiceAccount for a backend application<br>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  name: app-ksa<br>  namespace: backend<br>  annotations:<br>     Binds KSA to the Google Service Account<br>    iam.gke.io/gcp-service-account: db-connector@project-id.iam.gserviceaccount.com</pre><ol><li><strong>Deployment:</strong> Deploy the adapted Deployment, Service, and ConfigMap manifests to GKE. Refer to the official <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/">Kubernetes Deployment</a>, <a href="https://kubernetes.io/docs/concepts/services-networking/service/">Kubernetes Service</a>, and <a href="https://kubernetes.io/docs/concepts/configuration/configmap/">ConfigMap</a> for detailed guidance</li></ol><h3>3.2 GenAI for Manifest Refinement and Best Practices</h3><p>GenAI can be employed during the Stateless Workload Migration phase to refine the adapted manifests, ensuring they adhere to GKE best practices for security and efficiency</p><ol><li><strong>Security and Compliance Review:</strong></li></ol><ul><li><strong>Input:</strong> Provide the adapted GKE Deployment and Service YAMLs</li><li><strong>Prompt/Task:</strong> Instruct the AI to “Review this Kubernetes Deployment manifest for security best practices. Suggest changes to enforce least privilege, check for unnecessary root user privileges, and ensure secure image sources.”</li><li><strong>Output:</strong> Recommended security improvements, such as adding securityContext settings or updating image tags to specific, immutable digests</li></ul><p><strong>2. Resource Optimization Suggestions:</strong></p><ul><li><strong>Input:</strong> Share the adapted manifest along with observed resource usage metrics (if available)</li><li><strong>Prompt/Task:</strong> Ask the AI to “Analyze the existing resource requests and limits in this deployment. Based on the assumption of a burstable workload, suggest optimal values for requests and limits on an e2-standard-4 GKE node type.”</li><li><strong>Output:</strong> Optimized resources: requests and limits sections, helping to improve cluster utilization and reduce costs</li></ul><p><strong>3. Network Policy Generation:</strong></p><ul><li><strong>Input:</strong> A description of the desired network communication flow (e.g., “The frontend service on port 8080 must only be accessible from the external LoadBalancer and the internal backend service on port 80”)</li><li><strong>Prompt/Task:</strong> Instruct the AI to “Generate a GKE Network Policy YAML that enforces this ingress rule, assuming the frontend is labeled app: frontend-web and the backend is labeled app: backend-api.”</li><li><strong>Output:</strong> A ready-to-use NetworkPolicy definition, significantly speeding up the security configuration step</li></ul><h3>3.3 Stateful Workload Migration</h3><p>Migrating stateful workloads requires careful planning to ensure data integrity and minimal downtime. This process typically involves moving persistent data from one environment (e.g., a CFCR/PKS cluster) to another (e.g., a GKE cluster)</p><ol><li><strong>Persistent Volume (PV) Migration:</strong></li></ol><ul><li><strong>Snapshot:</strong> Create a final snapshot of the Persistent Disk (PD) attached to the CFCR/PKS cluster’s Persistent Volume (PV). This snapshot serves as a consistent point-in-time copy of data. For more details on creating disk snapshots, refer to the <a href="https://cloud.google.com/compute/docs/disks/create-snapshots">Google Cloud on Creating PD Snapshots</a></li><li><strong>Data Transfer:</strong> Use the created snapshot to create a new Compute Engine Persistent Disk in the target GKE project and region. This effectively transfers data into the new environment. The instructions on restoring a persistent disk from a snapshot in the <a href="https://cloud.google.com/compute/docs/disks/restore-and-delete-snapshots">Google Cloud Snapshot</a></li><li><strong>PV/PVC Creation:</strong> Create new PersistentVolume and PersistentVolumeClaim definitions within the GKE cluster. These definitions should reference the newly created Compute Engine disk. Consult the <a href="https://docs.cloud.google.com/kubernetes-engine/docs/concepts/storage-overview">Storage for GKE Clusters</a> for detailed guidance</li><li><strong>Storage Class:</strong> Utilize the appropriate GKE StorageClass (e.g., standard-row for standard persistent disks or premium-row for SSD persistent disks) when defining Persistent Volume Claim. GKE StorageClasses abstract underlying storage and simplify provisioning. Learn more about GKE StorageClasses in the <a href="https://docs.cloud.google.com/kubernetes-engine/docs">Google Kubernetes Engine</a></li></ul><ol><li><strong>StatefulSet Deployment:</strong> Deploy StatefulSet manifest to the GKE cluster, ensuring that it correctly references the new Persistent Volume Claim (PVC) created. This ensures a stateful application can access its migrated data. For comprehensive information on StatefulSets, refer to the <a href="https://docs.cloud.google.com/kubernetes-engine/docs/concepts/statefulset">StatefulSets in GKE</a></li></ol><h3>3.4 Securing Workload-to-Database Communication (Cloud SQL Proxy)</h3><p>Leverage the Cloud SQL Auth Proxy to enable secure, authenticated, and encrypted connections between GKE pods and Cloud SQL, using Workload Identity for authentication. The Cloud SQL Auth Proxy is a crucial tool for securely connecting applications to Cloud SQL instances without the need to manage SSL/TLS certificates manually or open firewall rules directly to database</p><p>For detailed instructions on configuring the Cloud SQL Auth Proxy as a sidecar, refer to the official Google Cloud documentation: <a href="https://cloud.google.com/sql/docs/postgres/connect-kubernetes-engine">Connect from GKE to Cloud SQL</a></p><p><strong>Configure Proxy as a Sidecar:</strong> Add the Cloud SQL Auth Proxy container as a sidecar to application pods in the Deployment or StatefulSet definition. This approach streamlines deployment and ensures that each application pod has its own dedicated proxy instance. The Workload Identity setup, typically configured in a preceding step, handles the authentication seamlessly, allowing the proxy to automatically obtain credentials from the GKE service account associated with the pod</p><pre># Partial Deployment manifest showing the sidecar<br>spec:<br>  template:<br>    spec:<br>      serviceAccountName: app-ksa # KSA bound to the GSA<br>      containers:<br>      - name: cloudsql-proxy<br>        image: gcr.io/cloudsql-docker/gce-proxy:&lt;version&gt;<br>        command:<br>          - &quot;/cloud_sql_proxy&quot;<br>          - &quot;-instances=&lt;PROJECT_ID&gt;:&lt;REGION&gt;:&lt;INSTANCE_NAME&gt;=tcp:5432&quot;<br>          # Proxy automatically uses the GSA identity provided by Workload Identity<br>      - name: application<br>        # ... application container configuration</pre><h3>3.5 Securing Inter-Workload Communication</h3><p>To ensure workloads communicate securely within GKE, utilize GKE Network Policies. These policies provide a robust framework for controlling traffic flow at the IP address or port level, enabling fine-grained control over how pods interact with each other and with external services</p><p><strong>GKE Network Policy:</strong> Implement network policies to enforce which pods can talk to which other pods (east-west traffic). This helps segment networks, preventing unauthorized communication between different application components or environments. <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/network-policy">Control communication between Pods and Services using network policies</a> and <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/">Network Policies</a></p><pre># Partial Deployment manifest showing the sidecar<br>spec:<br>  template:<br>    spec:<br>      serviceAccountName: app-ksa # KSA bound to the GSA<br>      containers:<br>      - name: cloudsql-proxy<br>        image: gcr.io/cloudsql-docker/gce-proxy:&lt;version&gt;<br>        command:<br>          - &quot;/cloud_sql_proxy&quot;<br>          - &quot;-instances=&lt;PROJECT_ID&gt;:&lt;REGION&gt;:&lt;INSTANCE_NAME&gt;=tcp:5432&quot;<br>          # Proxy automatically uses the GSA identity provided by Workload Identity<br>      - name: application<br>        # ... application container configuration</pre><h3>4. Monitoring, Logging, and Verification</h3><h3>4.1 Observability Setup</h3><p>GKE integrates natively with Google Cloud Observability, offering robust tools for monitoring, logging, and tracing applications. This native integration simplifies the process of gaining deep insights into the GKE environment’s performance and health. For comprehensive guidance, refer to the official <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/observability">GKE Observability</a></p><ul><li><strong>Logging:</strong> All container logs are automatically sent to <strong>Cloud Logging</strong>. This provides a centralized and scalable solution for collecting, storing, and analyzing logs from GKE clusters and applications. For more details, consult the <a href="https://cloud.google.com/logging/docs">Cloud Logging</a></li><li><strong>Monitoring:</strong> Utilize <strong>Cloud Monitoring</strong> to track GKE metrics such as CPU usage, memory consumption, and request latency. This allows to create dashboards, set up alerts, and gain real-time visibility into cluster’s operational status. Explore the capabilities in the <a href="https://cloud.google.com/monitoring/docs">Cloud Monitoring</a></li><li><strong>Tracing:</strong> Implement <strong>Cloud Trace</strong> for distributed tracing, which is especially crucial for understanding the flow of requests through complex microservice architectures. This helps in identifying performance bottlenecks and debugging issues across services. Learn more in the <a href="https://cloud.google.com/trace/docs">Cloud Trace</a></li></ul><h3>4.2 Migration Verification</h3><p>Before cutting over production traffic to the GKE environment, it is critical to perform thorough verification steps to ensure a smooth and successful migration</p><ol><li><strong>Functional Testing:</strong> Conduct comprehensive functional testing to ensure all application features work as expected in the GKE environment. This includes validating user interfaces, API endpoints, and all business logic</li><li><strong>Performance Testing:</strong> Run rigorous load tests to verify scalability and latency under expected peak load conditions. This helps identify any performance regressions or bottlenecks before they impact production users. Information on performance testing can be found within <a href="https://docs.cloud.google.com/architecture/best-practices-for-running-cost-effective-kubernetes-applications-on-gke">Google Cloud Optimization</a></li><li><strong>Security Audit:</strong> Perform a thorough security audit to verify that Workload Identity is functioning correctly and all network policies are enforced as intended. This ensures GKE cluster and applications are secure and compliant. Consult the <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity">Workload Identity documentation</a> for detailed setup and verification steps, and the <a href="https://docs.cloud.google.com/kubernetes-engine/docs/how-to/alias-ips">VPC Native clusters</a> for network policy enforcement</li></ol><h3>5. Cutover and Decommissioning</h3><h3>5.1 DNS and Traffic Cutover</h3><ol><li><strong>External Load Balancer:</strong> For frontend applications, update DNS records or external load balancer configuration to point to the GKE Ingress/LoadBalancer IP address. This typically involves modifying A/AAAA records in the DNS provider to reflect the new IP. <a href="https://docs.cloud.google.com/kubernetes-engine/docs/concepts/about-load-balancing">Load Balancing in GKE</a></li><li><strong>Deployment in GKE:</strong> If possible, perform a staged rollout using Blue/Green or Canary deployment strategies to minimize downtime and risk. Blue/Green deployments involve running two identical production environments (blue and green), while Canary deployments gradually shift traffic to a new version. <a href="https://docs.cloud.google.com/deploy/docs/deployment-strategies/canary">Canary Deployments in GKE</a></li></ol><h3>5.2 CFCR Decommissioning</h3><p>Once GKE is confirmed stable and serving all production traffic:</p><ol><li><strong>Data Backup:</strong> Perform a final backup of all CFCR data, ensuring data integrity and accessibility for future reference or migration if needed. This step is crucial to prevent data loss during decommissioning</li><li><strong>Resource Deletion:</strong> Decommission the CFCR cluster, BOSH director, and associated infrastructure resources to stop billing. This includes virtual machines, storage volumes, network configurations, and any other cloud resources specifically allocated for the CFCR deployment</li><li><strong>Monitoring and Alerting:</strong> Disable any monitoring and alerting systems specific to the CFCR environment to avoid false positives and reduce operational overhead</li><li><strong>Cost Management:</strong> Confirm that all billing for CFCR-related resources has ceased. Regularly review cloud bills to ensure no residual charges are incurred</li></ol><h3>Conclusion</h3><p>The migration from Cloud Foundry Container Runtime (CFCR/PKS) to Google Kubernetes Engine (GKE) is a strategic move that positions organizations to benefit from a fully managed, secure, and scalable cloud-native platform. By following the structured approach detailed in this guide; from initial assessment and infrastructure setup to workload migration, security enhancement, and final decommissioning; can ensure a successful and low-risk transition. <a href="https://cloud.google.com/kubernetes-engine/docs">GKE Documentation</a></p><p>Migrating workloads from CFCR to GKE offers several key advantages:</p><ul><li><strong>Enhanced security features</strong> like Workload Identity and GKE Network Policy Enforcement, ensuring robust protection for applications</li><li><strong>Improved scalability</strong> to handle fluctuating demands through Cluster Autoscaler and Horizontal Pod Autoscaler</li><li><strong>Access to Google Cloud’s robust suite of managed services</strong>, including Cloud SQL, Cloud Monitoring, and Artifact Registry</li><li><strong>Streamlined operations</strong> and reduced administrative overhead due to GKE’s managed control plane and native Google Cloud integration</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28226b0ae9a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GCP Pub/Sub a Kafka alternative]]></title>
            <link>https://medium.com/@damlevinay/gcp-pub-sub-a-kafka-alternative-140077a52334?source=rss-ebd99c72cb4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/140077a52334</guid>
            <category><![CDATA[publish-subscribe-pattern]]></category>
            <category><![CDATA[messaging]]></category>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[messaging-queue]]></category>
            <dc:creator><![CDATA[Vinay Damle]]></dc:creator>
            <pubDate>Tue, 19 Nov 2024 03:16:06 GMT</pubDate>
            <atom:updated>2024-11-19T03:16:06.487Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kafka Overview</h3><p>Kafka is a distributed streaming platform that is used to build real-time data pipelines and applications. It is a popular choice for many organizations, but there are a number of alternatives to Kafka that may be a better fit for some use cases. One such alternative is GCP Pub/Sub.</p><h3>GCP Pub/Sub</h3><p>Google Cloud Platform (GCP) Pub/Sub is a fully managed, serverless event ingestion service, known for its scalability and reliability. This asynchronous messaging service enables seamless communication between services, boasting low latency. It serves a dual purpose, acting as both a streaming analytics and data integration tool while parallelizing tasks efficiently. Pub/Sub operates through publishers and subscribers, where publishers broadcast events asynchronously, ensuring system flexibility and robustness. Ref: <a href="https://cloud.google.com/pubsub/docs/overview">What is Pub/Sub?</a></p><p>Pub/Sub is a powerful messaging service that can be used for a variety of applications. Here are some of the most <a href="https://cloud.google.com/pubsub/docs/overview#common_use_cases">Common use cases</a></p><h3>Components of Pub/Sub Service: The following are the components of a Pub/Sub service</h3><ul><li><strong><em>Publisher</em></strong> (also called a producer): creates messages and sends (publishes) them to the messaging service on a specified topic</li><li><strong><em>Message</em></strong>: the data that moves through the service</li><li><strong><em>Topic</em></strong>: a named entity that represents a feed of messages</li><li><strong><em>Schema</em></strong>: a named entity that governs the data format of a Pub/Sub message</li><li><strong><em>Subscription</em></strong>: a named entity that represents an interest in receiving messages on a particular topic</li><li><strong>S<em>ubscriber</em></strong> (also called a consumer): receives messages on a specified subscription</li></ul><p><strong><em>Two publisher clients send two different messages to a common Pub/Sub topic</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yQRjnkrrBcSiacH3danU0w.png" /></figure><p>A Pub/Sub message is data transmitted through the service and must contain either data or attributes</p><ol><li><strong><em>Message data</em></strong>: Core content of the message (text or binary data)</li><li><strong><em>Ordering key</em></strong>: Optional identifier to ensure ordered delivery of messages related to the same entity</li><li><strong><em>Attributes</em></strong>: Optional key-value pairs providing additional context and information about the message</li></ol><h3>Status of message in Pub/Sub: There can be three states for a message in a Pub/Sub service. Ref: <a href="https://cloud.google.com/pubsub/docs/pubsub-basics#status_of_a_message_in">Pub/Sub Message Status</a></h3><ul><li><strong><em>Acknowledged messages (acked)</em>:</strong> A message is removed from Pub/Sub after it is acknowledged by all subscribers</li><li><strong><em>Unacknowledged messages (unacked)</em></strong>: Unacknowledged Pub/Sub messages are redelivered until acknowledged or expired</li><li><strong><em>Negatively acknowledged messages (nacked)</em></strong>: Nacking a Pub/Sub message triggers immediate redelivery</li></ul><h3>Choosing Pub/Sub Pattern: Using multiple publishers and subscribers asks to determine the appropriate publish/subscribe architecture. Ref: <a href="https://cloud.google.com/pubsub/docs/pubsub-basics#choose_a_publish_and_subscribe_pattern">Pub/Sub Pattern</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BfM1FTAPEx5WQXIXXg0a2Q.png" /></figure><p>Some of the supported Pub/Sub publish subscribe patterns include the following:</p><ul><li><strong><em>Fan-in</em>: </strong>Multiple publishers send messages to a single topic, which is then processed by a single subscriber</li><li><strong><em>Load-balanced</em>: </strong>One or more publishers send messages to a single topic, which is then distributed among multiple subscribers for parallel processing</li><li><strong><em>Fan-out</em>: </strong>One or more publishers send messages to a single topic, and the messages are duplicated and sent to multiple subscriptions, each potentially with a different subscriber for independent processing</li></ul><h3>Choosing Pub/Sub Configuration: The Pub/Sub environment can be set up by using any one of the following options. Ref: <a href="https://cloud.google.com/pubsub/docs/pubsub-basics#choose_a_configuration_option">Pub/Sub Configuration</a></h3><ul><li>Google Cloud console</li><li>Google Cloud CLI</li><li>Cloud Client libraries (high-level client library)</li><li>REST and RPC APIs (low-level client library)</li></ul><h3>GCP Pub/Sub features:</h3><ul><li><strong><em>Management</em></strong>: Google Cloud Pub/Sub is a fully managed messaging service that facilitates seamless integration between various systems using a simple publish/subscribe model</li><li><strong><em>Scalability</em></strong>: Google Cloud Pub/Sub is a highly scalable and reliable messaging service that delivers low-latency performance through horizontal scaling and multi-zone message replication</li><li><strong><em>Resiliency</em>:</strong> Google Cloud Pub/Sub offers built-in cross-zonal replication and allows users to optimize performance and availability by adjusting settings, implementing redundancy, and distributing components across regions</li><li><strong><em>Pricing</em></strong>: Pub/Sub pricing has three main components:</li></ul><ol><li><strong><em>Throughput</em> costs </strong>— Google Cloud Pub/Sub pricing includes tiered throughput costs for message publishing and delivery after a free tier of 10 GB per month, with discounts applied for higher usage</li></ol><p><strong><em>2. Data</em></strong><em> </em><strong><em>transfer</em></strong> costs associated with throughput that crosses a Google Cloud zone or region boundary</p><p><strong><em>3. Storage</em></strong> of Pub/Sub message is generally free, but there are exceptions:</p><p><strong>3.1</strong> If you configure a topic to retain all messages</p><p><strong>3.2</strong> If you configure a subscription to retain acknowledged messages</p><p><strong>3.3</strong> When you create snapshots of subscriptions</p><ul><li><strong><em>Ease of use</em></strong>: Google Cloud Pub/Sub offers a user-friendly, fully managed messaging service with simple core concepts, comprehensive documentation, various client libraries, a convenient Cloud Console UI, and seamless integration with other Google Cloud services</li><li><strong><em>Publisher</em></strong> <strong><em>Support</em></strong>: Pub/Sub messages are sent to topics, which are containers for message streams delivered to interested subscribers, and there are two types: standard and import topics for Google Cloud Storage messages</li></ul><ol><li>Subscriptions are associated with a specific topic, indicating the source</li><li>Pub/Sub offers at-least-once message delivery and best-effort ordering to existing subscribers</li><li>Publish message flow</li></ol><p><strong>3.1</strong> Create a message with your data</p><p><strong>3.2</strong> Send a request to Pub/Sub to publish this message</p><p><strong>3.3</strong> Pub/Sub delivers the message to subscribers of the specified topic</p><p>4. Cloud Monitoring provides a number of metrics to monitor topics. Ref: <a href="https://cloud.google.com/pubsub/docs/monitoring#keeping_publishers_healthy">Maintain a healthy publisher</a> and <a href="https://cloud.google.com/pubsub/docs/publish-message-overview">Publisher Messages</a></p><ul><li><strong><em>Consumer Support</em></strong>: To receive messages from a topic, a subscription must be created, and only messages published after creation are accessible to subscribers. A topic can have many subscriptions, but each subscription is tied to only one topic</li></ul><ol><li>Subscribe message flow</li></ol><p><strong>1.1 </strong>Subscribers must confirm receipt of each message they receive</p><p><strong>1.2</strong> An unacknowledged message waiting for subscriber confirmation is considered outstanding</p><p><strong>1.3</strong> Pub/Sub will keep trying to deliver unacknowledged messages, but avoids sending the same message to multiple subscribers on the same subscription</p><p><strong>1.4</strong> Subscribers have a deadline to acknowledge messages. If the deadline passes, the message can be redelivered</p><p><strong>2</strong>. When you create a subscription, you must specify the type of message delivery. Pub/Sub offers the following types of subscriptions:</p><p><strong><em>2.1 Pull subscriptions</em></strong>: Subscriber initiates a “pull” request to receive messages. Pub/Sub responds with messages and IDs for acknowledgment. The subscriber then confirms receipt using these IDs, preventing message redelivery. Ref: <a href="https://cloud.google.com/pubsub/docs/pull">Pull Subscription</a></p><p><strong><em>2.2 Push subscriptions</em></strong>: Push subscriptions in Pub/Sub deliver messages as HTTPS requests, with the server adjusting delivery rate based on subscriber acknowledgement. Ref: <a href="https://cloud.google.com/pubsub/docs/push">Push Subscription</a></p><p><strong><em>2.3 Export subscriptions</em></strong> help you export your messages directly to a Google Cloud resource. These subscriptions include the following:</p><p><strong><em>2.3.1 BigQuery subscriptions</em></strong> export data to a BigQuery table: Pub/Sub delivers messages to BigQuery in batches, with successful writes acknowledged and failed writes retried or moved to a dead-letter topic. Ref: <a href="https://cloud.google.com/pubsub/docs/bigquery">BigQuery Subscription</a></p><p><strong><em>2.3.2 Cloud Storage subscriptions</em></strong> export Pub/Sub messages in batches to Cloud Storage, creating objects with dual acknowledgement for successful writes and retry or dead-letter topic handling for failures. Ref: <a href="https://cloud.google.com/pubsub/docs/cloudstorage">Cloud Storage Subscription</a></p><p><strong>3</strong>. Subscriptions expire after 31 days of inactivity by default, but this can be customized or prevented. Activity or updates reset the expiration timer. Manual deletion is also an option</p><p>Ref: <a href="https://cloud.google.com/pubsub/docs/subscription-overview">Receive Messages</a></p><ul><li><strong><em>Security</em></strong>: Google Cloud Pub/Sub provides programmatic access through client libraries, Google Cloud CLI, and REST, and authentication is handled using various methods depending on the environment, while access to resources is controlled through IAM authorization. Ref: <a href="https://cloud.google.com/pubsub/docs/authentication">Secure and Control Access</a></li><li><strong><em>Error handling</em></strong>: Pub/Sub handles subscriber message processing failures through a subscription retry policy or by forwarding messages to a dead-letter topic</li></ul><ol><li><strong><em>Subscription Retry: </em></strong>Pub/Sub automatically retries undelivered messages, and you can customize the retry policy</li></ol><p><strong><em>1.1 Immediate redelivery</em></strong>: By default, Pub/Sub tries resending the message immediately (and potentially to the same subscriber client)</p><p><strong><em>1.2 Exponential backoff</em></strong>: Pub/Sub’s exponential backoff retry policy progressively increases the delay between message redelivery attempts upon consecutive failures, with configurable minimum and maximum delays</p><p><strong>Please note:</strong> Exponential backoff allows Pub/Sub to keep delivering other messages even when some are negatively acknowledged, except when ordered message delivery is enabled. Ref: <a href="https://cloud.google.com/pubsub/docs/handling-failures#subscription_retry_policy">Subscription retry policy</a></p><p><strong><em>2. Dead Letter Topics (</em></strong><a href="https://cloud.google.com/pubsub/docs/handling-failures#dead_letter_topic">DLTs</a><strong><em>)</em></strong>: When a message can’t be delivered after a set number of retries, it can be automatically sent to a DLT for troubleshooting and later processing. DLTs can be configured for new as well as existing subscriptions. Ref: <a href="https://cloud.google.com/pubsub/docs/handling-failures#configure_a_dead_letter_topic">DLT Configuration</a></p><p>If you create a dead-letter topic, you can set the following subscription properties:</p><p><strong><em>2.1 Maximum number of delivery attempts</em></strong>: A numeric value specifying the maximum number of delivery attempts for a message before it is forwarded to a dead-letter topic</p><p><strong>2.1.1</strong> Default value = 5</p><p><strong>2.1.2</strong> Maximum value = 100</p><p><strong>2.1.3</strong> Minimum value = 5</p><p><strong><em>2.2 Project with the dead-letter topic</em></strong>: If the dead-letter topic is in a different project than the subscription, specify the project and ensure the topic is different from the subscription’s topic</p><p><strong><em>2.3 Message Ordering:</em></strong> For use cases where message order matters, Pub/Sub can preserve the order in which messages are published to a topic. Ref: <a href="https://cloud.google.com/pubsub/docs/ordering">Message Ordering</a></p><p>Ordering in Pub/Sub is determined by the following:</p><p><strong><em>2.3.1 Ordering key</em></strong>: An ordering key is a string used to group messages in Pub/Sub for ordered delivery, with throughput limits and the ability to handle more distinct values than traditional partitions</p><p><strong><em>2.3.2 Enable message ordering</em></strong>: Enabling message ordering guarantees delivery of messages with the same ordering key in the publishing order, while disabling it does not guarantee any specific order</p><p>Ref: <a href="https://cloud.google.com/pubsub/docs/ordering#considerations_when_using_ordered_messaging">Message Ordering considerations</a> before enabling</p><p><strong><em>2.4 Exactly-Once Delivery</em></strong>: This feature, currently in beta, aims to ensure that messages are delivered to subscribers exactly once, simplifying application logic</p><p><strong>2.4.1</strong> Guarantees a message is delivered only once to a subscriber within the same cloud region by using unique <em>message IDs</em></p><p><strong><em>2.4.2 </em></strong><em>Prevents</em> <em>redelivery</em> of messages after successful acknowledgment or while a message is outstanding (waiting for acknowledgment)</p><p><strong>2.4.3 </strong>Allows only the <em>latest acknowledgment ID</em> to be used in case of multiple valid deliveries due to acknowledgment deadline expiration or negative acknowledgment</p><p><strong>2.4.4 </strong>Exactly-once delivery subscriptions have specific regional quotas for both message consumption and acknowledgments/deadline extensions. Ref: <a href="https://cloud.google.com/pubsub/docs/exactly-once-delivery">Exactly-Once Delivery</a> and <a href="https://cloud.google.com/pubsub/docs/exactly-once-delivery#quotas">Exactly-Once delivery Quotas</a></p><p><strong><em>2.5 Custom Retry Policies</em></strong>: Pub/Sub allows customization of message delivery retry settings for subscribers through client libraries. These settings include:</p><p><strong><em>2.5.1 Initial request timeout</em></strong>: The time limit for the initial publish request</p><p><strong><em>2.5.2 Retry delay</em></strong>: The waiting time between retries after a request timeout</p><p><strong><em>2.5.3 Total timeout</em></strong>: The overall time limit for retrying publish requests before giving up</p><p>Ref: <a href="https://cloud.google.com/pubsub/docs/retry-requests#retry_a_message_request">Retry a message request</a></p><ul><li><strong><em>Monitoring: </em></strong>Pub/Sub does provide good monitoring dashboard and customized metrics dashboard is also possible</li></ul><ol><li><strong>Pub/Sub</strong> can be monitored using dashboards provided within Pub/Sub. The topics and subscriptions can be monitored. Ref: <a href="https://cloud.google.com/pubsub/docs/monitor-topic">Monitor topics</a>, <a href="https://cloud.google.com/pubsub/docs/monitor-subscription">Monitor subscriptions</a> and <a href="https://cloud.google.com/monitoring/api/metrics_gcp#gcp-pubsub">Pub/Sub Metric List</a></li></ol><p><strong>1.1</strong> <a href="https://cloud.google.com/pubsub/docs/monitoring#monitoring_the_backlog">Monitor Message Backlog</a>, to ensure that your subscribers are keeping up with the flow of messages</p><p><strong>1.1.1 </strong>Unacknowledged messages count — <a href="https://cloud.google.com/monitoring/api/metrics_gcp#pubsub/subscription/num_undelivered_messages">subscription/num_undelivered_messages</a></p><p><strong>1.1.2 </strong>Oldest unacknowledged message age — <a href="https://cloud.google.com/monitoring/api/metrics_gcp#pubsub/subscription/oldest_unacked_message_age">subscription/oldest_unacked_message_age</a></p><p><strong>1.1.3 </strong>Delivery latency health score — <a href="https://cloud.google.com/monitoring/api/metrics_gcp#pubsub/subscription/delivery_latency_health_score">subscription/delivery_latency_health_score</a></p><p><strong>2. </strong><a href="https://cloud.google.com/pubsub/docs/monitoring#monitoring_message_throughput_2"><strong>Monitor Message throughput</strong></a>, metrics to track the rate of messages being sent, as they may be sent in batches</p><p><strong>2.1 </strong>The volume of batch messages being sent by publishers — <a href="https://cloud.google.com/monitoring/api/metrics_gcp#pubsub/topic/send_request_count">topic/send_request_count</a></p><p><strong>2.2 </strong>The volume of individual (unbatched) messages being sent by publishers — <a href="https://cloud.google.com/monitoring/api/metrics_gcp#pubsub/topic/message_sizes">topic/message_sizes</a></p><p><strong>3. </strong>The metrics dashboard can be customized as per requirement: Ref: <a href="https://cloud.google.com/pubsub/docs/monitor-topic#customize_the_monitoring_dashboard">Monitoring Dashboard Customization</a></p><p><strong>4. </strong>The Pub/Sub audit logs and reports with labels can also be viewed. Ref: <a href="https://cloud.google.com/pubsub/docs/audit-logging">Audit Logs</a> and <a href="https://cloud.google.com/pubsub/docs/labels">Pub/Sub Reports</a></p><h3>Testing &amp; Integration Support of GCP Pub/Sub:</h3><p>Pub/Sub can be easily tested and integrated with various systems / applications / services. Ref: <a href="https://github.com/googleapis/java-pubsub-group-kafka-connector">Pub/Sub Kafka Connector</a></p><ul><li><strong><em>Integrations</em></strong>:</li></ul><ol><li>Pub/Sub can be seamlessly integrated with Apache Kafka. Ref: <a href="https://cloud.google.com/pubsub/docs/connect_kafka">Connect Pub/Sub to Apache Kafka</a></li><li>Pub/Sub can be very well integrated with various other GCP services like</li></ol><p><strong>2.1 </strong><a href="https://cloud.google.com/pubsub/docs/spring">Pub/Sub with Spring based applications</a></p><p><strong>2.2 </strong><a href="https://cloud.google.com/pubsub/docs/use-with-cloud-run">GCP Cloud Run</a></p><p><strong>2.3 </strong><a href="https://cloud.google.com/pubsub/docs/use-with-cloud-function-triggers">GCP Cloud Functions</a></p><p><strong>2.4 </strong><a href="https://cloud.google.com/pubsub/docs/stream-messages-dataflow">Pub/Sub with Dataflow</a></p><ul><li><strong>Testing: To</strong> develop and test your application locally, you can use the Pub/Sub emulator, which provides local emulation of the production Pub/Sub service. Ref: <a href="https://cloud.google.com/pubsub/docs/emulator">Test locally with Pub/Sub emulator</a></li></ul><h3>Limitations of GCP Pub/Sub:</h3><p>Pub/Sub is very rich in features however it does have some limitations</p><ul><li>Not as feature-rich as Kafka, Pub/Sub is not suitable for audio/video streaming</li><li>Not ideal for non-event driven systems</li><li>Pub/Sub supports exactly-once delivery only with pull subscriptions</li><li>Pub/Sub do have limitations with respect to maximum message size and number of Pub/Sub resources can be created in a project. Ref: <a href="https://cloud.google.com/pubsub/quotas#quotas">Pub/Sub Quotas</a></li></ul><h3>References:</h3><p><strong><em>GCP Pub/Sub:</em></strong></p><p><a href="https://cloud.google.com/pubsub/docs/overview">https://cloud.google.com/pubsub/docs/overview</a></p><p><a href="https://cloud.google.com/pubsub#all-features">https://cloud.google.com/pubsub#all-features</a></p><p><a href="https://cloud.google.com/pubsub/docs/compress-messages">https://cloud.google.com/pubsub/docs/compress-messages</a></p><p><a href="https://cloud.google.com/pubsub/quotas">https://cloud.google.com/pubsub/quotas</a></p><p><a href="https://cloud.google.com/pubsub/pricing">https://cloud.google.com/pubsub/pricing</a></p><p><a href="https://cloud.google.com/pubsub/docs/emulator">https://cloud.google.com/pubsub/docs/emulator</a></p><p><a href="https://cloud.google.com/pubsub/docs/connect_kafka">https://cloud.google.com/pubsub/docs/connect_kafka</a></p><p><a href="https://cloud.google.com/pubsub/docs/migrating-from-kafka-to-pubsub">https://cloud.google.com/pubsub/docs/migrating-from-kafka-to-pubsub</a></p><p>​​<a href="https://github.com/googleapis/java-pubsub-group-kafka-connector/">https://github.com/googleapis/java-pubsub-group-kafka-connector/</a></p><p><strong><em>Best Practices:</em></strong></p><p><a href="https://cloud.google.com/pubsub/docs/subscribe-best-practices">https://cloud.google.com/pubsub/docs/subscribe-best-practices</a></p><p><a href="https://cloud.google.com/pubsub/docs/publish-best-practices">https://cloud.google.com/pubsub/docs/publish-best-practices</a></p><p><a href="https://docs.confluent.io/platform/current/kafka/post-deployment.html">https://docs.confluent.io/platform/current/kafka/post-deployment.html</a></p><p><a href="https://strimzi.io/docs/operators/in-development/full/deploying.html#con-deploy-operator-best-practices-str">https://strimzi.io/docs/operators/in-development/full/deploying.html#con-deploy-operator-best-practices-str</a></p><p><strong><em>Pub/Sub code samples Samples:</em></strong></p><p><a href="https://cloud.google.com/pubsub/docs/samples">https://cloud.google.com/pubsub/docs/samples</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=140077a52334" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating the Cloud API Maze: Apigee, GCP API Gateway, or GCP Cloud Endpoints?]]></title>
            <link>https://medium.com/google-cloud/navigating-the-cloud-api-maze-apigee-api-gateway-or-cloud-endpoints-6bc772b44ff4?source=rss-ebd99c72cb4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bc772b44ff4</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[gcp-security-operations]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Vinay Damle]]></dc:creator>
            <pubDate>Thu, 18 Jan 2024 08:32:54 GMT</pubDate>
            <atom:updated>2024-01-18T14:46:42.599Z</atom:updated>
            <content:encoded><![CDATA[<p>The world of cloud APIs is like a vast and exciting labyrinth. With so many paths to choose from, finding the right platform for your project can feel like a real adventure! If you’re in the Google Cloud realm, you have three powerful guides to choose from: Apigee, API Gateway, and Cloud Endpoints.</p><p>But, you might ask, which one is my perfect API match? Well, let’s grab our map and compass and explore their unique strengths and ideal journeys together:</p><h3>Cloud Endpoints: The Security Guardian</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_m4bqVG9KZ08PLX6" /></figure><p>In the world of cloud APIs, security isn’t just important — it’s the rule of law. That’s where Cloud Endpoints comes in, shining as the security-focused champion. It arms you with an arsenal of features to fortify your API access, like:</p><ul><li><strong>Granular access control</strong>: Define precisely who can access your APIs and what actions they can perform</li><li><strong>Advanced security features</strong>: Leverage IP whitelisting, rate limiting, and threat detection for enhanced protection</li><li><strong>IAM integration</strong>: Benefit from centralized control through Google Cloud’s Identity and Access Management</li><li><strong>Auditing and logging</strong>: Track API usage meticulously for compliance and troubleshooting purposes.Choosing the Right Tool: Finding Your API Perfect Match</li><li><strong>Consumes compute resources</strong>: ESPv2 (Extensible Service Proxy) is deployed as a sidecar</li></ul><p><em>**Known issues: URL path with trailing slashes aren’t supported</em></p><h3>GCP API Gateway: The Lightweight Champion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L2FiOVmGolwDrC5n" /></figure><p>When you need to manage APIs without the hassle, GCP API Gateway swoops in to save the day. Like a streamlined superhero, it’s easy to use, quick to launch, and perfect for those just getting their API wings! GCP API Gateway is like a gentle guide, walking you through the process with its user-friendly ways and speedy setup as follows:</p><ul><li><strong>Simple deployment</strong>: Set up and manage your APIs directly from the Cloud Console</li><li><strong>Cost-effective</strong>: Pay only for the resources you use, making it budget-friendly</li><li><strong>Built-in security</strong>: Enjoy robust security with authentication, authorization, and throttling capabilities</li><li><strong>Seamless integration</strong>: Integrate seamlessly with other Google Cloud services like Cloud Functions and Cloud Run</li></ul><p><em>**Known issues: GCP API Gateway is not available in all the regions</em></p><h3>Apigee: The Comprehensive API Management Solution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I5yiiJQGWPBkH4gL" /></figure><p><strong><em>**</em></strong><em>Apigee integration may depend on the selected Apigee offerings and networking requirements</em></p><p>Apigee is the comprehensive toolkit of API management, offering a multitude of features to tackle complex API requirements. Think of Apigee as your all-in-one API management solution — it’s got a rich set of features to address even the most intricate API needs. Apigee is like the powerhouse of API management, providing a broad range of tools to streamline and effectively handle complex API scenarios:</p><ul><li><strong>Full lifecycle management</strong>: Design, develop, deploy, secure, and monitor your APIs with ease</li><li><strong>Advanced features</strong>: Unlock traffic routing, monetization options, insightful analytics, and AI-powered insights</li><li><strong>Hybrid and multi-cloud deployment</strong>: Adapt to your environment with on-premises, cloud, or hybrid deployments</li><li><strong>Flexibility</strong>: Embrace diverse API styles (REST, SOAP, GraphQL, gRPC or OpenAPI) and protocols</li></ul><h3>High level tabular comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lq_rYqU2_kMbFgTB7m9KIw.png" /></figure><p>The ideal platform ultimately depends on your specific needs and priorities. Consider these factors:</p><ul><li><strong>API Complexity</strong>: Simple vs. Complex API landscape</li><li><strong>Feature Requirements</strong>: Need for advanced features like monetization or AI insights?</li><li><strong>Budget Constraints</strong>: Pay-as-you-go or upfront costs?</li><li><strong>Security Concerns</strong>: Priority on stringent access control and data protection?</li></ul><p><em>Finally, API platforms are ever-evolving, unlocking new features and potential with each iteration. The dynamic landscape of APIs means platforms will consistently offer enhanced capabilities. To make the most of the API revolution, choose a platform that aligns with your current needs but also offers scalability for future growth. Select one that not only fulfills your immediate requirements but also has an eye on future expansion.</em></p><p><em>**Apigee is working on a product roadmap to converge Apigee + GCP Cloud Endpoints + GCP API Gateway into a single offering</em></p><h3>References</h3><ul><li><a href="https://cloud.google.com/endpoints/docs">https://cloud.google.com/endpoints/docs</a></li><li><a href="https://cloud.google.com/api-gateway/docs">https://cloud.google.com/api-gateway/docs</a></li><li><a href="https://cloud.google.com/apigee/docs">https://cloud.google.com/apigee/docs</a></li><li><a href="https://cloud.google.com/blog/products/application-modernization/choosing-between-apigee-api-gateway-and-cloud-endpoints">https://cloud.google.com/blog/products/application-modernization/choosing-between-apigee-api-gateway-and-cloud-endpoints</a></li><li><a href="https://cloud.google.com/apigee/docs/api-platform/architecture/overview">https://cloud.google.com/apigee/docs/api-platform/architecture/overview</a></li><li><a href="https://cloud.google.com/endpoints/docs/openapi/architecture-overview">https://cloud.google.com/endpoints/docs/openapi/architecture-overview</a></li><li><a href="https://cloud.google.com/api-gateway/docs/architecture-overview">https://cloud.google.com/api-gateway/docs/architecture-overview</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bc772b44ff4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/navigating-the-cloud-api-maze-apigee-api-gateway-or-cloud-endpoints-6bc772b44ff4">Navigating the Cloud API Maze: Apigee, GCP API Gateway, or GCP Cloud Endpoints?</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Choosing between Cloud Run and GKE]]></title>
            <link>https://medium.com/google-cloud/choosing-between-cloud-run-and-gke-05cb9029a1dd?source=rss-ebd99c72cb4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/05cb9029a1dd</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[runcloud]]></category>
            <category><![CDATA[gke]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Vinay Damle]]></dc:creator>
            <pubDate>Wed, 03 Jan 2024 05:34:58 GMT</pubDate>
            <atom:updated>2024-01-03T07:53:14.779Z</atom:updated>
            <content:encoded><![CDATA[<h3>Choosing between Cloud Run and GKE</h3><p>In this article we will discuss some aspects/factors which need to be considered while making a choice between GCP’s 2 powerful services. I would like to emphasise that the choice may depends on various other (minor) factors however here we would be discussing some major factors</p><p>Following will be discussed</p><ul><li>What is Cloud Run?</li><li>What is GKE?</li><li>Factors to consider Cloud Run and GKE</li></ul><p>What is Cloud Run?</p><p>Cloud Run is a managed compute platform that lets you run containers directly on top of Google’s scalable infrastructure.</p><p>You can deploy code written in any programming language on Cloud Run if you can build a container image from it. In fact, building container images is optional. If you’re using Go, Node.js, Python, Java, .NET Core, or Ruby, you can use the <a href="https://cloud.google.com/run/docs/deploying-source-code">source-based deployment</a> option that builds the container for you, using the best practices for the language you’re using.</p><h3>Services and jobs: two ways to run your code</h3><p>On Cloud Run, your code can either run continuously as a <em>service</em> or as a <em>job</em>. Both services and jobs run in the same environment and can use the same integrations with other services on Google Cloud.</p><ul><li><strong>Cloud Run services</strong>. Used to run code that responds to web requests, or events.</li><li><strong>Cloud Run jobs</strong>. Used to run code that performs work (a job) and quits when the work is done.</li></ul><p>What is GKE (Google Kubernetes Engine)?</p><p>GKE is a Google-managed implementation of the <a href="https://kubernetes.io/">Kubernetes</a> open source container orchestration platform. Kubernetes was developed by Google, drawing on years of experience operating production workloads at scale.</p><p>GKE is ideal if you need a platform that lets you configure the infrastructure that runs your containerised apps, such as networking, scaling, hardware, and security. GKE provides the operational power of Kubernetes while managing many of the underlying components, such as the control plane and nodes.</p><p>GKE offers the following modes of operation for clusters:</p><ul><li><strong>Autopilot mode (recommended): </strong>GKE manages the underlying infrastructure such as node configuration, autoscaling, auto-upgrades, baseline security configurations, and baseline networking configuration<strong>.</strong></li><li><strong>Standard mode: </strong>You manage the underlying infrastructure, including configuring the individual nodes.</li></ul><p>Factors to consider Cloud Run and GKE</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_sq-MgOfokqLUUo4tgJarg.png" /></figure><p>Some additional factors to consider:</p><ul><li><strong>Team expertise</strong>: If your team is not familiar with Kubernetes, Cloud Run’s managed approach may be easier to adopt.</li><li><strong>Monitoring and logging</strong>: Both Cloud Run and GKE offer monitoring and logging capabilities, but GKE may require more setup for custom needs.</li><li><strong>Portability</strong>: Both Cloud Run and GKE are based on open standards, so your applications can be ported to other platforms if needed.</li></ul><p><strong>Finally</strong>, the choice for you depends on your specific needs and priorities</p><ul><li>Simple serverless platform is Cloud Run; recommended for stateless applications</li><li>For complex deployments with more control or stateful applications; GKE could be a better option</li></ul><p>References</p><ul><li><a href="https://cloud.google.com/run/docs/overview/what-is-cloud-run">https://cloud.google.com/run/docs/overview/what-is-cloud-run</a></li><li><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/kubernetes-engine-overview">https://cloud.google.com/kubernetes-engine/docs/concepts/kubernetes-engine-overview</a></li><li><a href="https://cloud.google.com/blog/products/containers-kubernetes/when-to-use-google-kubernetes-engine-vs-cloud-run-for-containers">https://cloud.google.com/blog/products/containers-kubernetes/when-to-use-google-kubernetes-engine-vs-cloud-run-for-containers</a></li><li><a href="https://medium.com/google-cloud/choosing-between-gke-and-cloud-run-46f57b87035c">https://medium.com/google-cloud/choosing-between-gke-and-cloud-run-46f57b87035c</a></li><li><a href="https://tudip.com/blog-post/gke-or-cloud-run-which-should-you-use/">https://tudip.com/blog-post/gke-or-cloud-run-which-should-you-use/</a></li></ul><p>Author</p><p><a href="https://medium.com/u/ebd99c72cb4d">Vinay Damle</a></p><p><a href="https://medium.com/u/821d53520c2b">Aritra Banerjee</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=05cb9029a1dd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/choosing-between-cloud-run-and-gke-05cb9029a1dd">Choosing between Cloud Run and GKE</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migration of IBM Liberty to GKE using m2c-cli]]></title>
            <link>https://medium.com/google-cloud/migration-of-ibm-liberty-to-gke-using-m2c-cli-45403174341b?source=rss-ebd99c72cb4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/45403174341b</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[gke]]></category>
            <category><![CDATA[cloud-migration-service]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Vinay Damle]]></dc:creator>
            <pubDate>Sat, 30 Dec 2023 10:11:35 GMT</pubDate>
            <atom:updated>2024-01-01T01:29:44.129Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article we will discuss migration of IBM Liberty to Google Kubernetes Engine (GKE). It would be an overview of migration steps using m2c cli (not yet GA). The m2c-cli tool is not yet GA however it has been used to migrate simple IBM Liberty and the steps can be used as it is (with minimal changes)</p><p>Following will be discussed</p><ul><li>Environment setup on GCP</li><li>IBM Liberty server setup</li><li>Setup VM with m2c-cli tool installed in it</li><li>Create a auto-pilot GKE</li><li>Migrate and application deployed in IBM Liberty to GKE (m2c-cli Migration)</li></ul><p><strong><em>What is m2c-cli?</em></strong></p><p>M2c stands for migrate to containers and is a command-line tool that lets you set up and execute migrations on your local machine. More details about m2c-cli can be found <a href="https://cloud.google.com/migrate/containers/docs/m2c-cli-reference-linux">here</a>. The m2c architecture is as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zsHXw03F9nHmYE62" /></figure><p>Migration steps involve the fitment assessment as well however in this article we would assume IBM Liberty and application deployed in it is applicable for migration.</p><p>Modernisation using Migrate to Containers CLI spans across three steps: Transformation, Workload deployment, and Maintenance.</p><ol><li><strong>Transformation</strong> —<em> Migrate to Containers CLI is used to transform a VM-based application component into a container-based application component ready to be deployed. This spans across five phases:</em></li></ol><ul><li><em>Copy — Copy the file system of the target machine to the local machine.</em></li><li><em>Analyze — Analyze the file system to create a migration plan.</em></li><li><em>Edit — Edit the plan to modify the migration outputs to fit your needs.</em></li><li><em>Generate — Generate artifacts such as Docker files, Docker contexts, Kubernetes deployment files and Skaffold configuration.</em></li><li><em>Migrate data — Copy the data files into persistent volumes. This is optional.</em></li></ul><p><strong>2. Workload deployment</strong> — <em>You can deploy Migrated container workloads on any GKE or GKE Enterprise cluster meeting the minimum requirements. The migration artifacts can include one or more Dockerfiles, one or more Kubernetes deployment specs, and a Skaffold configuration file.</em></p><p><strong>3. Maintenance</strong> — <em>After you migrate container workloads, you typically perform optimisation and maintenance operations. The extracted workload content and the generated Dockerfile can be integrated in a CI/CD pipeline for efficient image-based maintenance.</em></p><p>In next steps we will majorly focus on transformation and workload deployment.</p><h3>Environment Setup On GCP</h3><p>Start a compute engine instance on GCP</p><p>Local Machine (m2c-cli workstation)</p><p><em>Install Ubuntu 20.04 TLS with e2-standard-8, and 500G disks, selected “Allow full access to all Cloud APIs”</em></p><p><em>Download m2c-cli in the workstation</em></p><pre>curl https://storage.googleapis.com/m2c-cli-release/0.2.0-offline.tar -o 0.2.0-offline.tar<br><br>tar -xvf 0.2.0-offline.tar</pre><p><em>Install docker from apt</em></p><pre>sudo apt update<br><br>sudo apt install apt-transport-https ca-certificates curl software-properties-common<br><br>curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -<br><br>sudo add-apt-repository &quot;deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable&quot;<br><br>apt-cache policy docker-ce<br><br>sudo apt install docker-ce</pre><p><em>Install gcloud</em></p><pre>**GCP compute engine by default provides gcloud. Skip the step if you are using the same<br><br>Doc: https://cloud.google.com/sdk/docs/install#deb<br><br>Auth plugin: https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke</pre><p><em>Install kubectl</em></p><pre>kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/<br><br>curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.24.0/bin/linux/amd64/kubectl</pre><p><em>Install skaffold</em></p><pre>curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 &amp;&amp; \<br><br>sudo install skaffold /usr/local/bin/</pre><p><strong>IBM Liberty server setup</strong></p><p><em>Install Ubuntu 20.04 TLS with e2-standard-8, and 100G disks,</em></p><p><em>Ensure you have JAVA installed and running before installing Liberty</em></p><p><em>Download Liberty binary file from IBM developer website: </em><a href="https://www.ibm.com/support/pages/websphere-liberty-developers"><em>https://www.ibm.com/support/pages/websphere-liberty-developers</em></a></p><pre>curl https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/23.0.0.5/wlp-webProfile8-java8-linux-x86_64-23.0.0.5.zip -o wlp-webProfile8-java8-linux-x86_64-23.0.0.5.zip</pre><p><em>Make sure the liberty server setup should follow the below path pattern</em></p><pre>&quot;/opt/*/ol/wlp&quot;        <br>&quot;/usr/*/ol/wlp&quot;         <br>&quot;/etc/*/ol/wlp&quot;         <br>&quot;/opt/*/ibm/wlp&quot;         <br>&quot;/opt/*/IBM/wlp&quot;         <br>&quot;/usr/*/ibm/wlp&quot;         <br>&quot;/usr/*/IBM/wlp&quot;         <br>&quot;/etc/*/ibm/wlp&quot;         <br>&quot;/etc/*/IBM/wlp&quot;         <br>&quot;/opt/*/ibm/WebSphere/Liberty&quot;         <br>&quot;/opt/*/IBM/WebSphere/Liberty&quot;         <br>&quot;/usr/*/ibm/WebSphere/Liberty&quot;         <br>&quot;/usr/*/IBM/WebSphere/Liberty&quot;         <br>&quot;/etc/*/ibm/WebSphere/Liberty&quot;         <br>&quot;/etc/*/IBM/WebSphere/Liberty&quot;</pre><p><em>Unzip the Liberty binary file that will create a wlp folder. Create a ${WLP_HOME} environment variable with the wlp folder path</em></p><pre>unzip wlp-webProfile8-java8-linux-x86_64-23.0.0.5.zip<br>      <br>cd wlp<br><br>export WLP_HOME=&quot;$PWD&quot;</pre><p><em>To deploy an application, create a server in Liberty installation following below commands</em></p><pre>cd ${WLP_HOME}/bin;<br><br>./server create &lt;Server Name&gt;;</pre><p><em>Once the server is created it will create a directory Server Name under ${WLP_HOME}/usr/servers</em></p><p><em>For deploying the application, package the application as a war file and copy the war file in ${WLP_HOME}/usr/servers/apps directory. You can deploy a test war from the command below</em></p><pre> curl https://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war</pre><p><em>Deploy the war</em></p><pre>Copy downloaded war to ${WLP_HOME}/usr/servers/apps directory<br><br>cp &lt;sample war source path&gt; ${WLP_HOME}/usr/servers/server/apps/</pre><p><em>Edit the server.xml</em></p><pre>vi ${WLP_HOME}/usr/servers/server/server.xml<br><br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;server description=&quot;new server&quot;&gt;<br>    &lt;!-- Enable features --&gt;<br>    &lt;featureManager&gt;<br>        &lt;feature&gt;webProfile-8.0&lt;/feature&gt;<br>    &lt;/featureManager&gt;<br>    &lt;!-- To access this server from a remote client add a host attribute to the following element, e.g. host=&quot;*&quot; --&gt;<br>    &lt;httpEndpoint id=&quot;defaultHttpEndpoint&quot;<br>                  httpPort=&quot;9080&quot;<br>                  httpsPort=&quot;9443&quot; /&gt;<br>    &lt;!-- Automatically expand WAR files and EAR files --&gt;<br>    &lt;applicationManager autoExpand=&quot;true&quot;/&gt;<br>    &lt;!-- add the below line --&gt;<br>    &lt;application location=&quot;sample.war&quot;/&gt;<br>&lt;/server&gt;</pre><p><em>Start the server using the below command</em></p><pre>cd ${WLP_HOME}/bin;<br><br>./server start &lt;Server Name&gt;;</pre><p><em>Run the below command to verify if application is up and running in liberty server</em></p><pre>curl http://localhost:&lt;PORT&gt;/sample/hello<br><br>**Make sure to use the correct port the default is 9080</pre><h3>Create a auto-pilot GKE</h3><p><em>Create a AutoPilot GKE cluster with default values in the project</em></p><h3>m2c-cli Migration</h3><p><em>Login to m2c-cli installed machine</em></p><p><em>ssh to VM in created in m2c-cli installed machine</em></p><pre>Copy the source systems file<br><br>./m2c copy ssh root@&lt;IP of the Source VM&gt; -o &lt;Source machine file&gt;.tar</pre><p><em>Analyse the copied file system</em></p><pre>./m2c analyze -s &lt;Source machine file&gt;.tar -p liberty-container -o&lt;Analysis output&gt;.tar -r wlp-java-home=&lt;Path to java under liberty server&gt; -r wlp-home=&lt;Path to liberty server&gt;</pre><p><em>Verify the analysis output is created properly</em></p><pre>A config.yaml should be available with all the details<br><br>ls &lt;Analysis output&gt;.tar/<br><br>output<br>config.yaml</pre><p><em>Generate the containerised deployable artifacts</em></p><pre>./m2c generate -i &lt;Analysis output&gt;.tar -o &lt;Deployable artifacts&gt;</pre><p><em>Verify the generated artifacts</em></p><pre>**The directory should have artifacts.yaml, &lt;application archieve for e.g. .war file&gt; and skaffold.yaml file<br><br>cd &lt;Deployable artifacts&gt;<br><br>ls<br><br>output<br>artifacts.yaml  sample.war  skaffold.yaml</pre><p><em>Create GCP repository</em></p><pre>Create repository<br><br>gcloud artifacts repositories create &lt;REPO_NAME&gt; --location=&quot;&lt;REPO_LOCATION&gt;&quot; --repository-format=&quot;&lt;FORMAT&gt;&quot; --project=&quot;&lt;PROJECT_ID&gt;&quot;</pre><p><em>Verify GCP repository</em></p><pre>List the repository<br><br>gcloud artifacts repositories list --project=&lt;PROJECT_ID&gt; --location=&lt;REPO_LOCATION&gt; --repository-format=&quot;&lt;FORMAT&gt;&quot;</pre><p><em>Set google cloud repository variable</em></p><pre>Pickup the repository path and set the variable<br><br>export GCR_REPO=&lt;GCP_REGION&gt;-docker.pkg.dev/&lt;PROJECT_ID&gt;/ibm-lib-server-m2c-repo</pre><p><em>Execute the skaffold command to deploy the artifacts</em></p><pre>skaffold run -d ${GCR_REPO}<br><br>Troubleshooting : If the above command throws an error, kindly execute the following command from the path where skaffold.yaml is present. The command will clear the cache.<br><br>skaffold delete</pre><p><em>Check the pods</em></p><pre>kubectl get pods</pre><p><em>Hit the service endpoints on the cluster</em></p><pre>kubectl exec -it &lt;podName&gt; -- bin/bash<br><br>curl -v http://localhost:9080/sample/hello<br><br>curl -v https://localhost:9443/sample/hello -s -L --insecure</pre><p>Finally, we observed that the IBM Liberty server migrated to GKE.</p><h3>Remarks</h3><p>In this article both, source and destination both are on GCP. The suggested solution can be used irrespective of whether the source is on any other cloud or on-prem. The appropriate source configuration needs to be configured with respect to m2c-cli requirement and everything will work as it is.</p><h3>References</h3><p><a href="https://cloud.google.com/blog/products/databases/new-cloud-based-cdc-replication-across-databases">https://cloud.google.com/migrate/containers/docs/m2c-cli-reference-linux</a></p><p><a href="https://cloud.google.com/sql/docs/sqlserver">https://cloud.google.com/migrate/containers/docs/m2c-cli/architecture</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45403174341b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/migration-of-ibm-liberty-to-gke-using-m2c-cli-45403174341b">Migration of IBM Liberty to GKE using m2c-cli</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrate Data (CDC) between Heterogeneous Databases using Striim]]></title>
            <link>https://medium.com/google-cloud/migrate-data-cdc-between-heterogeneous-databases-using-striim-16035a351e62?source=rss-ebd99c72cb4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/16035a351e62</guid>
            <category><![CDATA[cdc]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[change-data-capture]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Vinay Damle]]></dc:creator>
            <pubDate>Fri, 10 Mar 2023 10:53:25 GMT</pubDate>
            <atom:updated>2023-03-15T06:02:00.735Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article an overview of how to use Striim to migrate data between heterogeneous databases will be discussed for e.g. migration of data from source database i.e. SQL Server to destination database i.e. MySQL</p><h3>Following will be discussed</h3><ul><li>Deploy Cloud SQL Server (Source) database and MySQL (Destination) database instance on GCP</li><li>Enable Change Data Capture (CDC) in source database</li><li>Use Striim Cloud for migration</li><li>Create and run a Striim Service/App for database migration</li><li>View the results in MySQL (Destination Database)</li></ul><h3>Database terminology</h3><p>The most important data migration terms for these documents are defined as follows:</p><p><strong>Source database</strong>: A database that contains data to be migrated to one or more target databases.</p><p><strong>Target database</strong>: A database that receives data migrated from one or more source databases.</p><p><strong>Database migration</strong>: A migration of data from source databases to target databases with the goal of turning down the source database systems after the migration completes. The entire dataset, or a subset, is migrated.</p><p><strong>Homogeneous migration</strong>: A migration from source databases to target databases where the source and target databases are of the same database management system from the same provider.</p><p><strong>Heterogeneous migration</strong>: A migration from source databases to target databases where the source and target databases are of different database management systems from different providers.</p><h3>Striim</h3><p>Striim is a streaming Extract, Transform, and Load (ETL) data platform that enables real-time, zero downtime replication and transformation of data from a source database to one or more target database systems. It captures database operations like inserts, updates, and deletions from the transaction logs of the source database and replicates these changes to the target database using log-based change data capture (CDC) technology. Thanks to its user-friendly interface, users can quickly create their own pipelines to move and transform data with low or no code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*61j7XOdN9xho0Cul" /><figcaption>Image Source : Striim.com</figcaption></figure><h3>Prerequisites</h3><ul><li>For free trials, go to <a href="https://go2.striim.com/free-trial">https://go2.striim.com/free-trial</a>. You can choose between Striim Platform and Striim Cloud. For more information about Striim partnership with Google, AWS, and Azure, please contact: partners@striim.com</li><li>An available Striim instance (Version 4.1.2.0A<strong> </strong>or higher) in a cloud/on-premise environment that has access to the source and target database</li><li>Access to GCP cloud console and privileges to deploy Cloud SQL SQL Server and Cloud SQL MySQL instances</li></ul><h3>Continuous Migration (Change Data Capture)</h3><h3>Step 1: Create Cloud SQL, SQL Server instance</h3><ol><li>In the Google Cloud console, go to the SQL Server Instances page<br><a href="https://console.cloud.google.com/sql">Go to Cloud SQL Instances</a></li><li>Click Choose SQL Server</li><li>Enter name for Instance ID</li><li>Enter a Password for the SQL Server</li><li>Click Create<br>You’re returned to the instances list. You can click the new instance right away to see the details, but it won’t be available for other operations until it initialises and starts.</li></ol><p><strong><em>Note</em></strong><em>: In this example, the instance is created using default settings with a public IP address</em></p><h3>Step 2: Connect to SQL Server using any database client (Azure Database Studio is used)</h3><ol><li><strong>Create database</strong></li></ol><p><em>CREATE DATABASE &lt;DATABASE_NAME&gt;;</em></p><p>2. <strong>Create table in database created in 1</strong></p><p><em>USE &lt;DATABASE_NAME&gt;;</em></p><p><em>CREATE TABLE &lt;TABLE_NAME&gt;(</em></p><p><em>&lt;PRIMARY_KEY_COLUMN&gt; int NOT NULL,</em></p><p><em>&lt;PRIMARY_KEY_COLUMN&gt; varchar(255) NOT NULL,</em></p><p><em>&lt;PRIMARY_KEY_COLUMN&gt; varchar(255) NULL,</em></p><p><em>&lt;PRIMARY_KEY_COLUMN&gt; int NULL</em></p><p><em>);</em></p><h3>Step 3: Enable CDC (Change Data Capture) in Cloud SQL, SQL Server database/table</h3><p>Enable CDC for source database on database and table level</p><ol><li><strong>For database execute following</strong></li></ol><p><em>USE &lt;DATABASE_NAME&gt;;</em></p><p><em>EXEC msdb.dbo.gcloudsql_cdc_enable_db ‘&lt;DATABASE_NAME&gt;’;</em></p><p>2. <strong>For Table execute following</strong></p><p><em>USE &lt;DATABASE_NAME&gt;;</em></p><p><em>EXEC sys.sp_cdc_enable_table</em></p><p><em>@source_schema = N’dbo’,</em></p><p><em>@source_name = N’&lt;TABLE_NAME&gt;’,</em></p><p><em>@role_name = N’STRIIM_READER’</em></p><p><em>3. </em><strong><em>To verify is CDC is enabled execute following</em></strong></p><p><em>SELECT name, is_cdc_enabled FROM sys.databases;</em></p><p>The is_cdc_enabled flag should be set to 1</p><h3>Step 4: Create Cloud SQL MySQL instance</h3><ol><li>In the Google Cloud console, go to the Cloud SQL Instances page<br><a href="https://console.cloud.google.com/sql">Go to Cloud SQL Instances</a></li><li>Click Create Instance</li><li>Click Choose MySQL Server</li><li>Enter name for Instance ID</li><li>Enter a Username and Password for the MySQL</li><li>Click Create<br>You’re returned to the instances list. You can click the new instance right away to see the details, but it won’t be available for other operations until it initialises and starts.</li></ol><p><em>Note: In this example, the instance is created using default settings with a public IP address</em></p><h3>Step 5: Connect to MySQL instance and perform following steps</h3><p>Execute the create database and create tables script used in <a href="https://docs.google.com/document/d/1c52GMsX-SqxonxOUnNOBiMpL16w-JX5vUbA23mPtxY0/edit?resourcekey=0-DOuRDjIgkhVFJIQsaWma4w#heading=h.coef53qg05ob">Step 2</a></p><p><em>Note: In this example, the database and table with same name is created</em></p><h3>Step 6: Create a new striim cloud service</h3><p><strong>Create a striim service</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jW1URsLcX5SSHZzF" /><figcaption>striim cloude service page</figcaption></figure><p><em>Note: Use default configuration in advanced configuration</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kngR7CwEX0BzI0ZG" /><figcaption>striim cloude service creation in progress</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p--GS_Bn24YMfS_6" /><figcaption>striim cloud service created</figcaption></figure><p><strong>Provide a valid app name</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nC1qC8P5eBKsAHbS" /><figcaption>create an app</figcaption></figure><h3><strong>Source Database Configuration</strong></h3><ol><li>Select SQL Server CDC</li></ol><p>2. Provide Database details</p><ul><li>Database name for e.g. Organization</li><li>Connection url for e.g. jdbc:sqlserver://&lt;Database Server IP&gt;:&lt;Port&gt;;DatabaseName=&lt;Database Name&gt;</li><li>Tables for e.g. dbo.&lt;Table Name&gt;</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eGqrsNt512uivzsK" /><figcaption>CDC source database configuration</figcaption></figure><p>Provide Advanced Settings</p><p>Enter source database username and password</p><p><em>Note: For simplicity use default configuration under advanced configuration section</em></p><p>3. Source database is configured</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Fp-sqLWFVM9sUGvX" /><figcaption>source database successfully configured</figcaption></figure><p>4. Test source database connectivity</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BXo6P2JuXfGX8JhT" /><figcaption>source database connectivity test</figcaption></figure><h3><strong>Destination Database Configuration</strong></h3><ol><li>Click on striim icon followed by ‘+’ sign</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tzRsISu9xkXI5d__" /><figcaption>add destination database</figcaption></figure><p>2. Provide destination database configuration</p><ul><li>Adapter for e.g. DatabaseWriter</li><li>Connection url for e.g. jdbc:sqlserver://&lt;Database Server IP&gt;:&lt;Port&gt;/&lt;DatabaseName&gt;</li><li>Username and Password</li><li>Tables for e.g. dbo.&lt;Source Table Name&gt;,&lt;Destination Database Name&gt;.&lt;Destination Table Name&gt;;</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*A6RoJzTY6EM3uQCr" /><figcaption>destination database configuration page</figcaption></figure><p>Provide Advanced Settings</p><p><em>Note: For simplicity use default configuration under advanced configuration section</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*leClnKWqX7HzQS6Q" /><figcaption>destination database advanced configuration page</figcaption></figure><p>3. Click save and app is ready</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*88cIEjyfgNe8uX-_" /><figcaption>save configuration and app is ready</figcaption></figure><p>Step 9: Provide database (source and destination) access to striim service as per the below picture</p><ol><li>Striim IP can be found here</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*x0N1LD1UMfyS9StP" /><figcaption>striim cloud service details page</figcaption></figure><p>2. Provide striim access to the database for both source and destination databases. Below picture shows the source access for striim</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ok5FhhdG7T5EmXJM" /><figcaption>add striim IP to Cloud SQL database</figcaption></figure><h3>Step 10: Deploy and run striim app for one time migration</h3><p>Before migration the database state</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tfyVVNjcqvwxEpmW" /><figcaption>pre migration source and destination database state</figcaption></figure><h3>Start striim service</h3><ol><li>Deploy the app</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fR7A94XWqZ4X-mzd" /><figcaption>deploy the app</figcaption></figure><p>2. Start the app</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZRN40weaVTfWqp5E" /><figcaption>start the app</figcaption></figure><p>3. App started and ready for data migration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8dxh-73A1rgDoWTS" /><figcaption>app is running and ready for data migration</figcaption></figure><h3>Step 11: Add data to SQL Server database</h3><ol><li>Insert data in source database</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ItPL1rM6nD_10tjI" /><figcaption>CLOUD SQL, SQL server insert data</figcaption></figure><p>2. Striim app data preview</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oJohtqUaFgFldXrq" /><figcaption>app preview for data migration from source to destination</figcaption></figure><h3>Step 12: Verify MySQL database for all data migration</h3><ol><li>Destination database state</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RnK1kqZDHKnlwlPr" /><figcaption>data from SQL Server migrated to MySQL</figcaption></figure><p>2. After migration database state (both source and destination)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FxLTOPl9OklyU7K9" /><figcaption>post migration source and destination database state</figcaption></figure><h3>Advantages</h3><ol><li>Easy and one time configuration for data transfer</li><li>Supports data migration between both homogeneous and heterogeneous databases</li><li>Supports all databases across any platform</li><li>Available in Google marketplace</li><li>Striim support is good, fast and helpful</li><li>GCP DMS does not support few heterogeneous database migration in such cases striim could be ideal solution for migration</li></ol><h3>Disadvantages</h3><p>Cost could be one of the factor in comparison to other alternatives</p><h3>Remarks</h3><p>In this article both, source and destination are on GCP. The suggested solution can be used irrespective of whether the source database is on any other cloud or on-prem. The appropriate source database configuration needs to be configured and everything will work as it is.</p><h3>References</h3><p><a href="https://cloud.google.com/blog/products/databases/new-cloud-based-cdc-replication-across-databases">https://cloud.google.com/blog/products/databases/new-cloud-based-cdc-replication-across-databases</a></p><p><a href="https://cloud.google.com/sql/docs/sqlserver">https://cloud.google.com/sql/docs/sqlserver</a></p><p><a href="https://cloud.google.com/sql/docs/mysql">https://cloud.google.com/sql/docs/mysql</a></p><p><a href="https://cloud.google.com/database-migration/docs">https://cloud.google.com/database-migration/docs</a></p><p><a href="https://www.striim.com/docs/en/what-s-new-in-striim-cloud-4-1-2.html">https://www.striim.com/docs/en/what-s-new-in-striim-cloud-4-1-2.html</a></p><p>Authors</p><p><a href="https://medium.com/u/ebd99c72cb4d">Vinay Damle</a></p><p><a href="https://medium.com/u/79661ef9c3fc">Kartik Saxena</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16035a351e62" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/migrate-data-cdc-between-heterogeneous-databases-using-striim-16035a351e62">Migrate Data (CDC) between Heterogeneous Databases using Striim</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>