GeoServer on Kubernetes: Set up and operate a GeoServer Cluster in K8s
In this presentation, our Lead DevOps Alessandro Parma, together with our Director Simone Giannecchini, will walk us through the key points for setting up your own GeoServer cluster in K8s.
⚫ Our core products ⚫ Our offer Enterprise Support Services Deployment Subscription Professional Training Customized Solutions GeoNode 29th of June 2021- Online
core We actively participate in OGC working groups and get funded to advance new open standards We support standards critical to GEOINT 29th of July 2021- Online
and GeoNetwork ⚫ Vast experience with Raster Serving ⚫ Designed and developed JAI-Ext ⚫ Designed and developed ImageIO-Ext ⚫ Design and Developed most raster code in GeoTools/GeoServer ⚫ Vast Experience with Vector Data Serving ⚫ WFS, WMS, Vector Tiles with OGV ⚫ Extensive Experience with Spatial DBMS ⚫ Oracle, SQL Server, Postgis, MongoDB, etc.. ⚫ Extensive Experience with creating webgis applications ⚫ OpenLayers, Leaflet, Cesium, MapboxGL ⚫ Ext-JS, JQuery, Bootstrap, Angular, React, Redux ⚫ Extensive Experience with OGC Protocols ⚫ Extensive Experience in Performance and Scalability (Big Data and Cloud) ⚫ Unparalleled multi-industry experience 29th of July 2021- Online
⚫ If you are fond on GeoServer|GeoNode|MapStore|QGIS ⚫ If you like an international environment (both clients and colleagues) ⚫ If you like a challenging position ⚫ Send us your resume → multiple positions: ⚫ DevOps Engineer ⚫ Senior Frontend SW Engineer ⚫ Java SW Engineer ⚫ Support Engineer ⚫ Python SW Engineer 29th of July 2021- Online
to manage containerized workloads and services ⚫ Developed by Google ⚫ Based on their experience with Borg ⚫ Manages a cluster of nodes running Containerized applications ⚫ Helps you manage and scale your applications 29th of June 2021- Online
⚫ Type of virtualization that happens at the operating system level ⚫ Applications can run in an isolated user spaces called containers ⚫ Implemented at the kernel level, multiple containers share the same OS kernel 29th of July 2021- Online
⚫ VMs ⚫ Each individual VM has its own full OS ⚫ Hypervisor abstracting and managing resources ⚫ Typically, multiple applications running in the same VM ⚫ Looks pretty much like a dedicated machine ⚫ Pretty much transparent for Devs and Ops (with extra flexibility) 29th of July 2021- Online
⚫ Containers ⚫ Common, shared, OS kernel ⚫ Multiple containers (possibly from multiple projects) on the same machine ⚫ The OS provides isolation and security ⚫ Has its own idiosyncrasies, tools, skillset.. ⚫ Usually run one application per container ⚫ The application is bundled with its dependencies and runs in its own isolated user space (the “image”) 29th of July 2021- Online
boundaries → some applications starve for resources ⚫ Can’t easily reallocate resources after the initial setup ⚫ Virtual Machines ⚫ Multiple VMs on the same server → better resource utilization ⚫ Better isolation ⚫ Each VM has a copy of the OS 29th of July 2021- Online
isolated userspace ⚫ each container has its own filesystem, a share of CPU cores ⚫ decoupled from they underlying infrastructure → portable across distributions and cloud providers ⚫ … 29th of July 2021- Online
and easy rollback compared to VMs → Good fit for frequent deployments and CI/CD ⚫ separation of concerns between Devs and Ops ⚫ consistency across development in multiple environments 29th of July 2021- Online
applications in production with no downtime ⚫ Takes care of running your application containers on a distributed system ⚫ Takes care of scaling (both the application and the nodes cluster) and failover 29th of June 2021- Online
balancing ⚫ Storage Orchestration: mount storage of choice) ⚫ Automated rollouts and rollbacks. You describe the desired state for your containers ⚫ Self Healing: restart failing containers, hide them until they are ready state, .. ⚫ Configuration management and Secrets management: change config without rebuilding the application 29th of July 2021- Online
and tools available to manage containers ⚫ Docker Compose ⚫ allows you to define services as collections but that is pretty much it ⚫ Docker Swarm ⚫ gives you to work on a distributed environment ⚫ services definition and commands are somewhat similar to compose ⚫ not as sophisticated (and complex! as K8s) 29th of July 2021- Online
K8s became so popular ⚫ Had it’s own “engine” to run containers (“Cattle”) ⚫ Rancher 2 is a different, it is used to deploy and manage K8s cluster 29th of July 2021- Online
nodes (“workers”) running containerized applications ⚫ The Control Pane manages the pods and the worker nodes ⚫ API Server ⚫ Scheduler ⚫ Controller Managers 29th of July 2021- Online
⚫ Kubelet - makes sure that containers are running in a Pod ⚫ Proxy – communication with pods in and out of the cluster ⚫ Container Runtime - software that is responsible for running containers (docker, containerd, …) 29th of July 2021- Online
containers with shared namespaces and filesystem volumes ⚫ You can have more that one container running in a pod. They will be co-located and tightly coupled ⚫ Example: content serving container with a sidecar container that is updating the content ⚫ Pods can be scaled horizontally to run multiple instances of the same applications i.e. multiple replicas of the pod 29th of July 2021- Online
of the resource ⚫ Replicas ⚫ Rollout ⚫ Healing ⚫ .. ⚫ Node failure → creates a replacement pod ⚫ Deployment ⚫ Statefulset ⚫ DaemonSet 29th of July 2021- Online
a local Kubernetes Cluster ⚫ Compatible with multiple Oses ⚫ Cloud Service all major cloud providers offer Kubernetes as a managed service ⚫ AWS ⚫ Google Cloud ⚫ Azure ⚫ Digital Ocean 29th of July 2021- Online
Many Images available on the Hub ⚫ GeoSolutions one here with sources here ⚫ Community image is a WIP ⚫ Most of the work already done ⚫ Based on Tomcat images ⚫ Built periodically by Docker Hub ⚫ Readily usable, just change the webapp 29th of July 2021- Online
GeoServer is defined as a StatefulSets ⚫ Dedicated resources for backoffice and slave ⚫ Secrets for sensitive data ⚫ Master password ⚫ Database connection details ⚫ Volumes ⚫ Abstracting the underlying storage ⚫ Provide different StorageClasses 29th of July 2021- Online
definition ⚫ Sets the number of replicas ⚫ Health checks ⚫ References to Volumes ⚫ ConfigMap ⚫ Secrets ⚫ Environment Variables ⚫ … 29th of July 2021- Online
running on the same node ⚫ Fast read writes for ephemeral data ⚫ Be prepared to loose the data at any time ⚫ Good fit for Logs and Audit files 29th of July 2021- Online
⚫ You can run GeoServer in Kubernetes ⚫ There are readily available images for GeoServer on the Docker Hub ⚫ A K8s deployment of a GeoServer cluster requires you to define many resources Statefulsets, Volumes, Secrets, .. ⚫ Choose the appropriate StorageClass for each Volume 29th of July 2021- Online