Skip to content

Instantly share code, notes, and snippets.

@leoh0
leoh0 / fiction.md
Last active May 1, 2022 12:41
(픽션) cloud의 kubernetes 서비스에서 숨겨둔 master 노드에 들어가기

개요

우선 이 글은 cloud의 k8s 서비스들의 보안이 허술했을때 이야기 입니다. 현재로는 대부분의 서비스들이 높은 보안 수준을 유지하고 있기때문에 이런일은 없다고 볼 수 있습니다. 이 글은 픽션이고 k8s의 보안에 대한 경각심과 지식추구를 위해 작성되는 것입니다. 함부로 다른 서비스에 위해를 가하는 것은 엄연한 불법이고 이 글이 지향하는 바는 아닙니다.

cloud의 k8s 서비스는 master가 숨겨져 있다.

우선 이글을 읽기 전에 기초적으로 설명드려야 할 것은 대부분의 cloud의 k8s 서비스들은 master node가 존재하지 않는 구조임을 알고 있어야 합니다. 왜 master가 존재하지 않는지 먼저 설명하기 앞서, 정확하게 유저에 클러스터에 node로 master가 존재하지 않는 것이지 실제로 모든 k8s cluster는 master가 필요합니다. 즉, node로 등록이 안되어 master는 유저가 접근이 불가능하게 되어 있고 master에 유저가 원하는 워크로드를 당연히 올릴 수 없게 되어 있을 뿐이고 실제 master는 cloud에서 직접 관리하는식으로 제공합니다.

그렇다면 왜 master가 숨겨져 있을까요? 이유는 여러가지가 있지만 대부분의 cloud 서비스는 management의 영역과 user의 영역을 정확하게 구분해야 합니다. k8s의 형상이란 걸 정의할때 여러가지 구성요소가 있겠지만 대부분 master와 같은 control plane 노드안에 담겨져 있고 이부분이 user가 변경하지 않아야 k8s 각 클러스터의 보다 정확한 형상관리가 가능해집니다. 그래서 master를 management 영역으로 두고 유저가 원하는 워크로드를 올릴 수 있는 영역을 user 영역으로 두고 있습니다. 그래서 user가 master에 접근을 못하도록 막는 것이 중요합니다.

@Ottifant881
Ottifant881 / PY0101EN-1-1-Types.ipynb
Created November 24, 2019 09:07
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Papers (and articles) for the Container Technologies

For own self-education purpose

Containers

  1. TBD
  2. Docker: Lightweight Linux Containers for Consistent Development and Deployment, Dirk Merkel, Linux Journal, March 2014
  3. Networking in Containers and Container Clusters, Victor Marmol, Rohit Jnagal, and Tim Hockin, netdev 0.1, Feb 14-17, 2015
@calavera
calavera / Dockerfile
Last active January 13, 2020 07:56
Dockerfile to build the Go version of Execsnoop and run it with JSON output format
FROM ubuntu:18.04
# Install BCC Tools
RUN set -ex; \
echo "deb [trusted=yes] http://repo.iovisor.org/apt/bionic bionic-nightly main" > /etc/apt/sources.list.d/iovisor.list; \
apt-get update -y; \
DEBIAN_FRONTEND=noninteractive apt-get install -y auditd bcc-tools curl gcc git libelf1 libbcc-examples;
# Install Go
ENV GO_SHA 1dfe664fa3d8ad714bbd15a36627992effd150ddabd7523931f077b3926d736d
@fntlnz
fntlnz / README.md
Last active March 3, 2025 05:23
Seccomp bpf filter example

Seccomp BPF filter example

Use bpf programs as filters for seccomp, the one in the example will block all the write syscalls after it's loaded.

Usage

Compile it with just

gcc main.c
@CodyReichert
CodyReichert / react-es6-flow-emacs-configuration.md
Last active February 22, 2025 10:42
Configuring Emacs for react, es6, and flow

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

Extending BCC support for Performance Co-Pilot and Vector

The goal of this project was to integrate several BCC tools into Performance Co-Pilot (PCP) and Vector. The integration of the BCC tools into the PCP framework provides a number of benefits: 24/7 monitoring, archiving and exporting of the collected metrics to another system and much more. Furthermore, Vector can consume the metrics in near real-time and display them in the browser with meaningful visualizations, e.g. heat maps and flame graphs. Adequate visualization of collected performance metrics eases the identification and resolution of performance issues.

Integrated BCC Tools

The following BCC tools were integrated into PCP and Vector:

  • execsnoop: traces new processes
  • runqlat: records the scheduler run queue latency as histogram
  • profile: records stack traces at a specific interval
@lethee
lethee / pkg-config-guide.md
Last active December 27, 2022 00:52
Guide to pkg-config 한글 번역
@sftblw
sftblw / 공유 라이브러리의 로드 시점 재배치(relocation).md
Last active May 24, 2022 10:37
공유 라이브러리의 로드 시점 재배치(relocation)

공유 라이브러리의 로드 시점 재배치(relocation)

이 글은 원글을 이해하기 위해 이미 번역이 존재하지만서도 직접 번역한 것입니다. 매끄러운 가독성과 쉬운 이해를 위해 의역을 왕창 끼얹었으며, 제가 이해한 바를 기준으로 하므로 오역 같은 걸 왕창 끼얹나? 일 수도 있습니다. 지적 감사합니다.

아직 번역 허락을 받진 않았습니다. 받을지 여부도 모르겠습니다. 귀찮아서 안 받을 것 같습니다.


  • 로드적재를 혼용해서 쓰고 있습니다. 정리할 필요가 있어보이네요. 귀찮다 안 해야지...
  • 섹션, 세그먼트는 서로 혼동될 수 있는데다 전문용어인 걸로 판단해 음차대로 썼습니다.