Understand Pods in Kubernetes

kubernetes podsPods are the smallest deployable units of computing that you can create and manage in Kubernetes.

A Pod contains one or more containers. Containers are grouped into Pods so Kubernetes can provide services that are not supported in containers. For example, Pods provide shared storage/network resources, and a specification for how to run the containers. Docker is the most commonly known runtime, but it can be other types.

In short, Pods enable you to manage several tightly coupled application containers as a single unit.

Kubernetes can run Windows. So the command to manage Pods running Windows are the same as those running Linux. But you should know that you define Windows or Linux when you create the cluster.

In this article, you learn about how Pods work, how you can have multiple containers in a Pod, the lifecycle of a Pod, how Kubernetes handles networking with a Pod, and how to define a Pod using a PodTemplate in a Deployment, Job, or other Kubernetes resource.

Continue reading “Understand Pods in Kubernetes”

Understanding Kubernetes workload node objects

 

Kubernetes has a variety of objects to manage your cluster and your applications. Your applications run in workload nodes (virtual machines) and the containers are managed by the control plane.

You use manifests to tell the control plane how you want to configure your Kubernetes objects using manifests, and the control plane changes the state of the cluster to your desired state.

In other words, you tell the control plane how to configure the workload nodes with your containers, networking, security, and storage. And the control plane makes it happen.

In this article, learn the definitions of the workload objects. And learn some initial best practices to use when defining your Kubernetes objects.

Continue reading “Understanding Kubernetes workload node objects”

Understand kubectl to manage Kubernetes objects

kubernetesresourcesUse kubectlto interact with Kubernetes resources, such as Pod, Services, Volumes, and more. When you use kubectl commands, you are querying or setting the desired state of the cluster. kubectlis calling into the API and manipulating or getting status from the primitives.

In this post, learn about the important resources that developers use and how you go about getting information about and creating a resource using kubectl.

Continue reading “Understand kubectl to manage Kubernetes objects”

What developers should learn about Kubernetes

kubernetes-ckad-color-1024x1004In this article, you will learn what you need to know to become an expert at Kubernetes. The curriculum for developers is outlined in the Certified Kubernetes Application Developer (CKAD) program.

It has been developed by the Cloud Native Computing Foundation (CNCF), in collaboration with The Linux Foundation. These organizations provide certifications to demonstrate competence in Kubernetes for both software and for individual contributors, including administrators, developers, and security specialists. 

As you dive into Kubernetes, take a look at what the exams measure. The curriculum is published https://github.com/cncf/curriculum as a set of PDF that describe the high level concepts you will need the following CNCF exams:

  • Certified Kubernetes Administrator (CKA)
  • Certified Kubernetes Application Developer (CKAD)
  • Certified Kubernetes Security Specialist (CKS)

For developers, the exam certifies that you can design, build, configure, and expose cloud native applications for Kubernetes. In this article, learn about the overall categories and some sample challenges you may see.
Continue reading “What developers should learn about Kubernetes”

Install Kubernetes, kubectl on your development computer

kubectl to k8skubectl, allows you to run commands against Kubernetes clusters. Use kubectl to deploy applications, inspect and manage cluster resources, and view logs.
In this post, learn how to install kubectl, how to access the cluster, and the basic command you use to manage the cluster.
There are a lot of tools you can use. In this post, learn about:

  • On Windows: Docker plus WSL
  • On Ubuntu Linux: MicroK8s
  • On desktops connected to Azure Kubernetes Service
  • Bridge to Kubernetes for Visual Studio users
  • Kind and Minikube to run cluster on your local development machine

Continue reading “Install Kubernetes, kubectl on your development computer”

Read and write Kubernetes objects using kubernetes.io API reference documentation

Once you have deployed your Kubernetes infrastructure, you have a control plane and a worker plane. You define how you want Kubernetes to manage your Kubernetes objects through tools that interact with the API. Kubernetes objects are all those persistent entities in the Kubernetes system, such as your Pods, Nodes, Services, Namespaces, ConfigMaps, Events.

Most operations can be performed through the kubectl command-line interface or other command-line tools, such as kubeadm, which in turn use the API.

kubectl is the command-line tool where you run most of the commands to manage the Kubernetes clusters. Use kubectl to deploy applications, inspect and manage cluster resources, and view logs.

In this post, learn how to use the Kubernetes documentation to discover the objects, how to figure out to describe the state you want for your Kubernetes objects. In particular, you will want to know the fields to use in your .yaml files and how to determine what the default values are. You will also learn the basic kubectl commands.
Continue reading “Read and write Kubernetes objects using kubernetes.io API reference documentation”

Walkthrough: Create Azure Kubernetes Service (AKS) using Terraform

When you are building your cloud infrastructure, you can think of it as code. Infrastructure as code means that the virtual machines, networking, and storage can all be thought of as code. On Azure, you can build your infrastructure using Azure Resource Manager (ARM) templates and deploy using PowerShell. You could also use PowerShell or Azure CLI to express your infrastructure. Many enterprises use Terraform, an open source infrastructure as code provider by HashiCorp, to build, change, version cloud infrastructure.

You can use Terraform across multiple platforms, including Amazon Web Services, IBM Cloud (formerly Bluemix), Google Cloud Platform, DigitalOcean, Linode, Microsoft Azure, Oracle Cloud Infrastructure, OVH, Scaleway VMware vSphere or Open Telekom Cloud, OpenNebula and OpenStack. In this article, we’ll explore Azure. At a high level, you write the configuration of your infrastructure in Terraform files that can describe the infrastructure of a single application or of your entire data center, and then apply it to the target cloud (in this case Azure).

In this article, you install Terraform and configure it, create the Terraform configuration plans for two resource groups an AKS cluster and Azure Log Analytics workspace, and apply the plans into Azure. Continue reading “Walkthrough: Create Azure Kubernetes Service (AKS) using Terraform”

Walkthrough: Create Azure Kubernetes Service (AKS) using ARM template

Azure Kubernetes Service (AKS) provides a hosted Kubernetes service where Azure handles critical tasks like health monitoring and maintenance for you. AKS reduces the complexity and operational overhead of managing Kubernetes by offloading much of that responsibility to Azure. When you create AKS, Azure provides the Kubernetes control plane. You need manage only the agent nodes within your clusters.

There are several ways to deploy to Azure, including using the portal, Azure CLI, Azure PowerShell, and Terraform.

In this walkthrough, you will create an AKS cluster using an ARM template and then use Azure CLI to deploy a simple application to the cluster. You will review the design decisions made for the walkthrough, see how the template supports Kubenet for Kubernetes networking, role-based-access-control (RBAC) and how it supports managed identities to communicate with other Azure resources. Finally, you will use a Kubernetes manifest file to define the desired state of the cluster, and test the application.

Continue reading “Walkthrough: Create Azure Kubernetes Service (AKS) using ARM template”

Serverless apps in Kubernetes, Azure Functions

Azure Functions provides serverless computing as Functions-as-a-Service, which provides a platform for you to develop, run, and manage application functionalities without the complexity of building and maintaining the infrastructure typically associated with developing and launching an app.

Azure Functions executes code to respond to changes in data, responding to messages, running on a schedule, or as the result of an HTTP request.

Typically, you just deploy the function into an existing base container provided by Microsoft. But if you specific needs, such as specific version, you can deploy your Function app as a custom container into the Azure Functions service.

As an alternative to Azure service, you can deploy Azure Functions into your own Kubernetes deployment and run Functions along side your other Kubernetes deployments.

With Azure Functions service you no longer need to manage disk capacity or memory. The compute requirements are are handled automatically. You pay for what and when you use it, rather than fixed sizes and memory required by other Azure services.

You can use a Docker container to deploy your function app to Azure Functions. You can also deploy Azure Functions app into your own Kubernetes.

In this article, you learn about the key features of Azure Functions with containers.

Let’s get started.

Continue reading “Serverless apps in Kubernetes, Azure Functions”

When to use Azure Kubernetes Service (AKS) for compute service

Azure offers several ways to host your application code. In some recent articles here we described some services and features for App Services and Container Instances. Other alternatives include Azure Batch and Azure Functions.

The Azure Architecture Center provides guidance on how to choose a compute service for your application.

There are tradeoffs between control and ease of management. Infrastructure-as-a-Service (IaaS) vs Platform-as-a-Service (PaaS) offers various levels of control, flexibility, and portability.

Microsoft provides guidance for your compute service selection.

Continue reading “When to use Azure Kubernetes Service (AKS) for compute service”