<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>K8s on Wenhan blog</title>
    <link>https://wenhan.blog/tags/k8s/</link>
    <description>Recent content in K8s on Wenhan blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>ja-JP</language>
    <lastBuildDate>Wed, 23 Jun 2021 17:34:31 +0900</lastBuildDate><atom:link href="https://wenhan.blog/tags/k8s/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Kubernetes証明書の有効期限テスト</title>
      <link>https://wenhan.blog/posts/20210623_modify-kubeadm-cert-expired-period-test/</link>
      <pubDate>Wed, 23 Jun 2021 17:34:31 +0900</pubDate>
      
      <guid>https://wenhan.blog/posts/20210623_modify-kubeadm-cert-expired-period-test/</guid>
      <description>業務の都合で、有効期限切れのKubernetesクラスタで証明書の更新手順を検証する必要がありました。 初めての作業だったので、ここに手順を記録します。
kubeadmソースの修正とビルド ビルド環境にgoとgitをインストールし、goのバイナリパスをPATHに追加します。
Kubernetesのソースコードをダウンロードします。今回はv1.18.18を使用しました。
git clone -b v1.18.18 https://github.com/kubernetes/kubernetes
証明書の有効期間を10分に設定するため、以下のファイルを修正します：
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index b56891ca908..eed934280e7 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -46,7 +46,8 @@ const ( TempDirForKubeadm = &amp;#34;tmp&amp;#34; // CertificateValidity defines the validity for all the signed certificates generated by kubeadm - CertificateValidity = time.</description>
    </item>
    
  </channel>
</rss>
