lapee79's Tech Blog

lapee79의 기술 지식 창고.

Use a local disk through Local Persistent Volumes in Kubernetes

The Local Persistent Volumes feature has been promoted to GA in Kubernetes 1.14. A local persistent volume represents a local disk directly-attached to a single Kubernetes Node. In the Kubernetes system, local disks can be used through HostPath, LocalVolume. HostPath: The volume itself does not contain scheduling information. If you want to fix each pod on a node, you need to configure scheduling information, such as nodeSelector, for the pod. Continue reading

Setup Production Ready Kubernetes on baremetal with kubespray

Kubespray is a composition of Ansible playbooks, inventory, provisioning tools, and domain knowledge for generic OS/Kubernetes clusters configuration management tasks. Prerequisites Hardware 5 Nodes: Virtual/Physical Machines Memory: 8GB CPU: 4Core Hard disk: 120GB available Software Kubernetes nodes Ubuntu 18.04 Python SSH Server Privileged user Kubespray machine Ansible 2.7.8+(not 2.8.x) Jinja 2.9+ Nodes Networking requisites Internet access to download docker images and install softwares IPv4 Forwarding should be enabled In order to avoid any issue during deployment, you should disable firewall. Continue reading

Monitoring HTTP using Blackbox exporter

Blackbox exporter can monitor the external services over HTTP, HTTPS, DNS, TCP, ICMP on Prometheus. In this post, I’ll show you how to monitor HTTP/HTTPS using Blackbox exporter. Blackbox exporter is going to be running on Kubernetes. Environment Before you begin, you need to have these: Kubernetes Prometheus operator Blackbox exporter configuration Write the Blackbox configuration file as ConfigMap to configure http module for monitoring web services. Continue reading

Loki - Kubernetes logging

Loki is a Prometheus-inspired logging service for cloud native infrastructure. What is Loki? Open sourced by Grafana Labs during KubeCon Seattle 2018, Loki is a logging backend optimized for users running Prometheus and Kubernetes with great logs search and visualization in Grafana 6.0. Grafana Loki is a set of components, that can be composed into a fully featured logging stack. It builds around the idea of treating a single log line as-is. Continue reading

Setup a production-ready Istio

Istio is open source service mesh. It adds an abstraction layer to the network. It also provides capabilities to connect, manage and secure microservices. Istio provides built-in configuration profiles. But for production environment, we need to : improve performance by using tuned settings. enable SDS to secure gateways. integrate with Prometheus operator, Grafana, Jaeger and Kiali. Now we’ll set up Istio on Kubernetes for production environment. Install a istio using tuned settings Download Istio release. Continue reading

Alerts of the Prometheus Alertmanager with MS Teams

Prometheus alerting through Alertmanager can be configured to send messages to Email, SMS or messangers. My company uses Microsoft Teams as team messanger. Alertmanager supports Email, HipChat, PagerDuty, Slack etc. natively except Microsoft Teams. So it needs to be used Webhook to send a third-party tool that sends messages to Microsoft Teams. This post assumes that you are using the Prometheus operator for monitoring your Kubernetes cluster. We’re going to know how to send Prometheus alerts to Microsoft Teams. Continue reading