Skip to content

Commit

Permalink
last changed at Jan 16, 2025 2:11 PM, pushed by Shawn
Browse files Browse the repository at this point in the history
  • Loading branch information
HackMD committed Jan 16, 2025
1 parent edbcb72 commit 22a9441
Showing 1 changed file with 185 additions and 8 deletions.
193 changes: 185 additions & 8 deletions src/content/blog/kind.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pubDatetime: 2025-01-16T19:30:00+08
tags:
- meetup
- kubernetes
- kind
- podman

description: "let's run kind in podman"
youtube: b-b9Nahro9w
Expand All @@ -16,7 +18,6 @@ meetupLocation: Second space 捷運中央公園站 三號出口 R9 Exit 3
[![hackmd-github-sync-badge](https://hackmd.io/o6XKOGGyREyfbxsSDNveJg/badge)](https://hackmd.io/o6XKOGGyREyfbxsSDNveJg)



本次活動我們會在 second space 與 線上同時舉行
上次 Johnny 幫我們介紹 本地端 如何建 kubernetes,
而 單純 本地測試 還有一個更輕量的選擇 kind
Expand All @@ -29,16 +30,41 @@ Shawn 打算介紹如何使用 用 podman 使用 kind, 以及 podman 一些好

---

# slide: kind
# kind

### kubernetes in docker (or podman)


:::info
2025/01 KaLUG.tw meetup / Shawn
👉[youtube](https://www.youtube.com/watch?v=b-b9Nahro9w) / [github demo code](https://github.com/kalug/kind-demo)👈
:::

:::danger
⚡ Don't use for PRODUTION env ⚡
:::

----

# Outline

* what's kind?
* other choices
* inside kind
* make fun with podman
- docker in docker
- LoadBalancers -
cloud-provider-kind


:::info
👍 using kind for dev or testing
:::

---

## What's kind

- Kubernetes in Docker
https://kind.sigs.k8s.io/

- Go packages implementing cluster creation, image build, etc.
Expand All @@ -48,7 +74,29 @@ https://kind.sigs.k8s.io/

----

## Quick start
### Deep Dive: Kind
Nov 22, 2019
{%youtube tT-GiZAr6eQ%}

----

### Deep Dive: Kind

* test kubernetes
* E2E testing
* 7:30 Networking Deep Dive (kindnet)


----

### Testing your K8s apps with KIND

May 24, 2019
{%youtube 8KtmevMFfxA %}

----

### Quick start

https://kind.sigs.k8s.io/docs/user/quick-start/

Expand All @@ -57,7 +105,7 @@ https://kind.sigs.k8s.io/docs/user/quick-start/
curl -Lo ~/bin/kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-amd64 && chmod +x ~/bin/kind
```

```
```
$ kind create cluster
```

Expand All @@ -74,6 +122,12 @@ kind-control-plane Ready control-plane 52s v1.32.0 10.89.0.2 <non

----

### What is a kubernetes

![k](https://kubernetes.io/images/docs/components-of-kubernetes.svg)

----

### What is a kind cluster? - kind nodes

```
Expand Down Expand Up @@ -112,8 +166,53 @@ CONTAINER IMAGE
...
```

---

# Others?


Kind < k3d < minikube

----

| | features | vm | vendor | LB |
| -------- | -------- | -------- | ------ | --- |
| kind | lite | no | sig-testing | cloud-provider-kind |
| minikube | full features | yes | sig-cluster-lifecycle | mikikube tunnel |
| kubeadm | - | - | Kubernetes | - |
| k3d | k3s | - | k3s | via Ingress (recommended) |
| microk8s | snap | yes | canonical | MetalLB |
| [capid](https://cluster-api.sigs.k8s.io/) | cluster-api | no | sig-cluster-api | |


----

## tips:

### kubie
A more powerful alternative to kubectx and kubens
https://github.com/sbstp/kubie

- Shell prompt modification
- Split configuration files
- kubie exec

### known-issues
- https://kind.sigs.k8s.io/docs/user/known-issues/
- like max_user_instances


---

## Inside kind

- privileged mode
- Docker in Docker
- systemd in Docker
- load

---

### Docker in Docker
#### container inside container

Expand All @@ -128,8 +227,7 @@ https://learn.snyk.io/lesson/container-runs-in-privileged-mode/




---
----

### systemd in Docker

Expand All @@ -150,6 +248,85 @@ RUN passwd -d root
ENTRYPOINT [ "/lib/systemd/systemd" ]
```

----

## more deeper

- kubelet - https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/
- kubeadm -
- kubelet plugin
- nvkind - https://github.com/NVIDIA/nvkind/
- cri-o in kind

----

### kubeadm

https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/




----

cri-o in kind
https://github.com/cri-o/cri-o/blob/main/tutorials/crio-in-kind.md

---

### kindnet

CNI - https://github.com/containernetworking/cni

- cni/net.d/10-kindnet.conflist


---

### Local Registry
### LoadBalancers - cloud-provider-kind

https://kccnceu2024.sched.com/event/1YhhY

https://github.com/kubernetes-sigs/cloud-provider-kind

{%youtube U6_-y24rJnI %}


----

### cloud-provider-kind - one service one kindccm

```
podman ps
a0a8b3c02bab docker.io/envoyproxy/envoy:v1.30.1 bash -c echo -en ... About an hour ago Up About an hour 0.0.0.0:40617->10000/tcp kindccm-KDNZI53UFUSNY4WSWHFWVBBUZDBQ3EQ5KR66Y5RJ
```

----

* kubectl port-forward service/doc-controller 8080:8080

https://kccnceu2024.sched.com/event/1YhhY/keep-calm-and-load-balance-on-kind-antonio-ojea-benjamin-elder-google


----

## Other tips
- Local Registry
- kubie


----

## nvkind

- https://github.com/NVIDIA/nvkind/
- https://github.com/NVIDIA/k8s-device-plugin/
- https://www.youtube.com/watch?v=jnHlwZKJiL4

- docker only

{%youtube jnHlwZKJiL4 %}


0 comments on commit 22a9441

Please sign in to comment.