Get startedGet started for free

Cloud Deploy and Knative Serving

1. Cloud Deploy and Knative Serving

While Cloud Run can run as services or jobs, Knative Serving can only run as services. Knative Serving service is for applications that need to be continuously available to handle incoming requests. You can think of it as a serverless web application platform. A Knative Serving service listens and responds to HTTP requests, scales automatically based on traffic, is ideal for web applications, APIs, microservices. There are some Knative Serving service deployment implications to be aware of. Cloud Deploy focuses on updating your service with new revisions of your container image. Canary deployments and traffic splitting are often used to minimize disruptions. Health checks are critical to ensure Knative Serving can correctly scale and manage your service. So where does Cloud Deploy come into the equation? For Knative Serving services, Cloud Deploy manages the deployment of new revisions of your container image. This enables deployment strategies like canary or blue/green deployments to smoothly transition traffic to the new version. Knative serving runs on your GKE clusters. This gives you control over the underlying infrastructure, networking, and security, but you are responsible for managing the GKE clusters. Knative serving integrates with other Kubernetes workloads. You can use Kubernetes services to access these services. So when might you want to use a canary deployment with Knative Serving? Meet Ashwin. Ashwin is responsible for deploying a new version of Product Recommendation Engine for an e-commerce commerce application. This engine is critical for driving sales, and bugs or performance issues in the new version could significantly impact revenue and customer experience. Ashwin developed a new version of this authentication service with significant performance improvements and enhanced security features. However, he's also introducing potentially breaking changes to the authentication logic. Ashwin wants to minimize the risk of a widespread outage during the rollout. Using Knative serving's traffic splitting features, Ashwin plans to deploy the new version to a small subset, somewhere between 5% and 10%, of the app's production traffic. This subset of users, the canary group, experiences the new version of the service while the majority of users continue to use the stable existing version. Ashwin can use Cloud Service Mesh or Istio for more sophisticated traffic management, such as routing traffic based on HTTP headers or other criteria. This allows for very fine-grained control over the canary deployment. Ashwin closely monitors the performance, error rates, and logs of both the new and old versions of the service. He's looking for any anomalies in the new version. Ashwin can use Prometheus and Grafana, common in GKE environments, to collect and visualize custom metrics from the authentication service, giving him deeper insights into its performance. GKE provides centralized logging and monitoring across the entire environment. This allows Ashwin to easily compare the behavior of the new and old versions of the authentication service, even if other parts of the application are running on GKE clusters. If the monitoring and validation reveal no issues, Ashwin gradually increases the percentage of traffic directed to the new version using progressive rollout capabilities. Ashwin increases the traffic in increments-- e.g, 25%, 50%, 100%, allowing him to observe the impact at each stage. If there are GKE clusters running on-premises or in other clouds, Knative serving allows you to use a consistent canary deployment strategy across Ashwin's entire GKE environment. If any problems are detected during the canary or progressive rollout, he can quickly and seamlessly roll back to the previous stable version. This minimizes the impact on users and prevents widespread disruption. The new version has been thoroughly evaluated and deemed stable, so Ashwin completes the rollout, directing 100% of traffic to the new service.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.