Deploy Kubernetes Services with Portainer

by Portainer team, on Apr 13, 2021 5:20:28 PM

With Portainer it is very easy to configure Services Types with your Applications in Kubernetes. Let's check how this is done for ClusterIP, NodePort and Load Balancer.

No Service Type

  1. Deploying an Applications with no Service Type associated to it is very simple by not assigning any ports to it:

ClusterIP Service Type

  1. When deploying and Application that requires a ClusterIP Service type you simply publish a port with the Internal publishing mode enabled:

NodePort Service Type

  1. When deploying and Application that requires a NodePort Service type you need to select the Cluster publishing mode and respective container+node ports required/used by the application:

Load Balancer Service Type

  1. When deploying and Application that requires a Load Balancer Service type you need to select the Load Balancer publishing mode and respective ports required or used by the application:
  2. In order to use the Load Balancer a plugin like MetalLB or similar has to be installed on your Kubernetes Cluster. You can then enable the Load Balancer via Portainer by:
    1. Opening you Cluster setup:


    2. Enabling the option in the Networking features of your Kubernetes cluster:


Ingress Service type

  1. When deploying and Application that requires an Ingress Service type you need to first create a Resource Pool with the Ingress configured:


  2. You can the deploy the Application with the Ingress option making sure to select the proper Resource Pool:
  3. Once the proper Resource Pool is selected the Ingress option will be available for the application:
  4. In order to use the Ingress Service type an Ingress controller like Nginx or Traefik has to be installed on your Kubernetes Cluster. You can then enable the Ingress Controller via Portainer by:
    1. Opening you Cluster setup:


    2. Enabling the option in the Networking features of your Kubernetes cluster:

Additional features via Portainer

Auto-Scaling

  1. Make sure the metrics server plugin or similar is installed on your Kubernetes Cluster.
    1. Enable the metrics server features via Portainer by opening you Cluster setup:


    2. Select the Enable features using metrics server under Resources and Metrics:


  2. When deploying an application you can select the auto scaling and respective minimum and maximum instances along with the Target CPU usage (%):

Placement Rules

  1. When deploying an application you can select the placement preferences under Placement preferences and constraints and configuring the rule or rules you need for you application:
  2. Make sure to select the Placement policy accordingly:

We have also recorded a how-to video to show this in action.

 

See for yourself with a live online Portainer Business demo

Let us introduce you to a world of fast and easy app deployment, governance, and management in Docker/Swarm and Kubernetes. Schedule a demo with our tech team and see how Portainer's container service delivery platform can make everyone's life easier.

REQUEST A PORTAINER BUSINESS DEMO

Topics:container managementkuberneteskubernetes ui

Comments