YOKOHEI.COM

YOKOHEI.COM

›Kubernetes the Hard Way

Kubernetes Basics

  • Kubernetes Basics
  • Commands
  • Static Pod
  • Drain & Uncordon
  • Cluster Upgrade
  • Backup & Restore
  • Certification
  • RBAC
  • CNI
  • CoreDNS
  • Ingress

Kubernetes the Hard Way

  • the Hard Way?
  • AWS Prerequisites
  • CA and TLS
  • Configuration Files
  • Data Encryption
  • Bootstrapping etcd
  • Bootstrapping Control Plane
  • Bootstrapping Worker Node
  • kubectl configuraton
  • Pod Network
  • RBAC for Kubelet
  • Coredns Add-On
  • Test
  • TLS Bootstrapping

Amazon EKS

  • EKS Introduction
  • Ingress with ALB
  • PersistentVolume with EBS
  • NetworkPolicy with Calico
  • Secret with KMS
  • EKS Hands-On

Provisioning Pod Network

CNI Plugin のインストール

ワーカーノード側

$ wget https://github.com/containernetworking/plugins/releases/download/v0.7.5/cni-plugins-amd64-v0.7.5.tgz
$ sudo tar -xzvf cni-plugins-amd64-v0.7.5.tgz --directory /opt/cni/bin/

ubuntu 16.04 を使っている場合以下のコマンドが必要になるかも。

$ sudo ln -s /run/resolvconf/ /run/systemd/resolve

マスターノード側

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"

以下の通り、weave の pod が動いてることがわかる。

$ kubectl get pods -n kube-system
NAME              READY   STATUS    RESTARTS   AGE
weave-net-855sc   2/2     Running   0          3m59s
weave-net-tlwpf   2/2     Running   0          3m59s

トラブルシューティングガイド

もしここで Pod が動かなかったりしたら、以下のコマンドでトラシューができるかも。

マスター側で weave pod の event を見てみる

$ kubectl describe pod weave-net-855sc -n kube-system

ワーカー側で各プロセスが動いているか、期待しないエラーが出ていないかを見てみる

$ ps auxw | grep kube-proxy
$ ps auxw | grep kubelet
$ journalctl
← kubectl configuratonRBAC for Kubelet →
▼ Codes ▼
LeetCodeGitHub
▼ Profile ▼
LinkedInFlickr
▼ Logo made with DesignEvo ▼
DesignEvo
Copyright © 2020 Kohei Yoshida