Reader small image

You're reading from  Hands-On Kubernetes on Azure

Product typeBook
Published inMar 2019
PublisherPackt
ISBN-139781789536102
Edition1st Edition
Right arrow
Authors (2):
Shivakumar Gopalakrishnan
Shivakumar Gopalakrishnan
author image
Shivakumar Gopalakrishnan

Shivakumar Gopalakrishnan is DevOps architect at Varian Medical Systems. He has introduced Docker, Kubernetes, and other cloud-native tools to Varian product development to enable "Everything as Code". He has years of software development experience in a wide variety of fields, including networking, storage, medical imaging, and currently, DevOps. He has worked to develop scalable storage appliances specifically tuned for medical imaging needs and has helped architect cloud-native solutions for delivering modular AngularJS applications backed by microservices. He has spoken at multiple events on incorporating AI and machine learning in DevOps to enable a culture of learning in large enterprises. He has helped teams in highly regulated large medical enterprises adopt modern agile/DevOps methodologies, including the "You build it, you run it" model. He has defined and leads the implementation of a DevOps roadmap that transforms traditional teams to teams that seamlessly adopt security- and quality-first approaches using CI/CD tools. He holds a bachelor of engineering degree from College of Engineering, Guindy, and a Master of Science degree from University of Maryland, College Park.
Read more about Shivakumar Gopalakrishnan

Gunther Lenz
Gunther Lenz
author image
Gunther Lenz

Gunther Lenz is senior director of the technology office at Varian. He is an innovative software R&D leader, architect, MBA, published author, public speaker, and strategic technology visionary with more than 20 years of experience. He has a proven track record of successfully leading large, innovative, and transformational software development and DevOps teams of more than 50 people, with a focus on continuous improvement. He has defined and lead distributed teams throughout the entire software product lifecycle by leveraging groundbreaking processes, tools, and technologies such as the cloud, DevOps, lean/agile, microservices architecture, digital transformation, software platforms, AI, and distributed machine learning. He was awarded Microsoft Most Valuable Professional for Software Architecture (2005-2008). Gunther has published two books, .NET – A Complete Development Cycle and Practical Software Factories in .NET.
Read more about Gunther Lenz

View More author details
Right arrow

Serverless Functions

Serverless functions allow code to be deployed without worrying about managing servers and the like. In this chapter, readers will learn how to deploy serverless functions on AKS directly using Kubeless, which will be useful should they be required to provide serverless functions within their organization network. The reader will also integrate AKS-deployed applications with Azure Event Hubs. We will be covering the following topics in brief:

  • Kubeless services
  • Events and serverless functions

Technical requirements

You will need to use a modern browser, such as Chrome, Firefox, or Edge.

Kubeless services

The popularity of AWS Lambda, the serverless compute platform, has resulted in many frameworks that allow similar functionality, both as cloud provider-managed (for example, Azure Functions, Google Cloud Functions, and IBM Cloud Functions) and self-managed frameworks. Kubeless is one of the self-managed ones. As in any new fast-moving technology, there is no clear winner yet. Here are some open source alternatives to Kubeless that are Kubernetes friendly:

  • Serverless (https://serverless.com/): A Node.js-based serverless application framework that can deploy and manage functions on multiple cloud providers, including Azure. Kubernetes support is provided via Kubeless.
  • OpenFaas (https://www.openfaas.com/): A portable framework, providing ease of use for building serverless functions with Docker and Kubernetes, which has first-class support for metrics.

  • Fission...

Events and serverless functions

Serverless functions mainly use events to trigger their invocation. While the following invocation is useful for testing and debugging purposes, it is not really useful for other purposes. Serverless functions excel when they are run on demand and, in general, as part of some automation triggered by events. Calling them manually, as we are doing in the following code, is useful only for testing and debugging purposes:

kubeless function call hello --data 'Hello world!' -n serverless

To be really useful, we need the ability to trigger it through events. One of the easiest ways to integrate our serverless functions with events is to use Azure Event Hubs. In this section, we will integrate Azure Event Hubs with our serverless functions. We will be using Azure Functions to call our serverless function.

There are multiple ways that a function...

Summary

This chapter was all about installing Kubeless to successfully run our first serverless function. In the latter part of the chapter, we integrated our Kubeless serverless functions with events using Azure Event Hubs. By using smaller code that is loosely coupled, we can now make faster independent releases a reality in our organization. The next and final chapter will cover future steps, where we will be pointed to different resources and can learn/implement advanced features in security and scalability. For this chapter, please refer to: https://www.packtpub.com/sites/default/files/downloads/Next_Steps.pdf

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Kubernetes on Azure
Published in: Mar 2019Publisher: PacktISBN-13: 9781789536102
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Shivakumar Gopalakrishnan

Shivakumar Gopalakrishnan is DevOps architect at Varian Medical Systems. He has introduced Docker, Kubernetes, and other cloud-native tools to Varian product development to enable "Everything as Code". He has years of software development experience in a wide variety of fields, including networking, storage, medical imaging, and currently, DevOps. He has worked to develop scalable storage appliances specifically tuned for medical imaging needs and has helped architect cloud-native solutions for delivering modular AngularJS applications backed by microservices. He has spoken at multiple events on incorporating AI and machine learning in DevOps to enable a culture of learning in large enterprises. He has helped teams in highly regulated large medical enterprises adopt modern agile/DevOps methodologies, including the "You build it, you run it" model. He has defined and leads the implementation of a DevOps roadmap that transforms traditional teams to teams that seamlessly adopt security- and quality-first approaches using CI/CD tools. He holds a bachelor of engineering degree from College of Engineering, Guindy, and a Master of Science degree from University of Maryland, College Park.
Read more about Shivakumar Gopalakrishnan

author image
Gunther Lenz

Gunther Lenz is senior director of the technology office at Varian. He is an innovative software R&D leader, architect, MBA, published author, public speaker, and strategic technology visionary with more than 20 years of experience. He has a proven track record of successfully leading large, innovative, and transformational software development and DevOps teams of more than 50 people, with a focus on continuous improvement. He has defined and lead distributed teams throughout the entire software product lifecycle by leveraging groundbreaking processes, tools, and technologies such as the cloud, DevOps, lean/agile, microservices architecture, digital transformation, software platforms, AI, and distributed machine learning. He was awarded Microsoft Most Valuable Professional for Software Architecture (2005-2008). Gunther has published two books, .NET – A Complete Development Cycle and Practical Software Factories in .NET.
Read more about Gunther Lenz