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

kubectl configuraton

Admin 用 config ファイルの作成

以下のコマンドで admin ユーザ用に context の設定を行うためのファイルを作成する。

kubectl config set-cluster kubernetes-the-hard-way \
    --certificate-authority=ca.crt \
    --embed-certs=true \
    --server=https://37.xx.xx.xx:6443

kubectl config set-credentials admin \
    --client-certificate=admin.crt \
    --client-key=admin.key

kubectl config set-context kubernetes-the-hard-way \
    --cluster=kubernetes-the-hard-way \
    --user=admin

kubectl config use-context kubernetes-the-hard-way

--server では API server の受け口となる IP を指定する。
例ではパブリック IP にしているが、今回は master から kubectl を利用するので、master nodes の Private IP で作成した。

これで設定が適用されたことがわかる。

$ kubectl get nodes
NAME       STATUS     ROLES    AGE   VERSION
worker-1   NotReady   <none>   39m   v1.15.3
worker-2   NotReady   <none>   10m   v1.15.3
← Bootstrapping Worker NodePod Network →
▼ Codes ▼
LeetCodeGitHub
▼ Profile ▼
LinkedInFlickr
▼ Logo made with DesignEvo ▼
DesignEvo
Copyright © 2020 Kohei Yoshida