{"id":259,"date":"2021-07-03T12:01:30","date_gmt":"2021-07-03T03:01:30","guid":{"rendered":"https:\/\/rfsec.ddns.net\/db\/?p=259"},"modified":"2021-07-03T12:01:37","modified_gmt":"2021-07-03T03:01:37","slug":"rock-pi4%e3%81%b8raspi%e3%81%ae%e6%89%8b%e9%a0%86%e3%81%a7kubernetes%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"post","link":"https:\/\/rfsec.ddns.net\/db\/?p=259","title":{"rendered":"rock pi4\u3078raspi\u306e\u624b\u9806\u3067Kubernetes\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u308b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306e\u53c2\u7167\u5143\uff1a<a href=\"http:\/\/\u30e9\u30ba\u30d1\u30a4\u3067Kubernetes\u30af\u30e9\u30b9\u30bf\u3092\u69cb\u7bc9\u3059\u308b\" data-type=\"URL\" data-id=\"http:\/\/\u30e9\u30ba\u30d1\u30a4\u3067Kubernetes\u30af\u30e9\u30b9\u30bf\u3092\u69cb\u7bc9\u3059\u308b\">\u30e9\u30ba\u30d1\u30a4\u3067Kubernetes\u30af\u30e9\u30b9\u30bf\u3092\u69cb\u7bc9\u3059\u308b<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306e\u74b0\u5883<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>rock pi4 4GB RAM<\/li><li>Linux rock 4.4.154-110-rockchip-gcef30e88a9f5 #1 SMP Mon Jun 22 07:37:10 UTC 2020 aarch64 aarch64 aarch64 GNU\/Linux<\/li><li>18.04.5 LTS (Bionic Beaver)<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b21\u306e\u624b\u9806\u3067<strong>kubelet kubeadm kubectl<\/strong>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ sudo -s\n# curl -s https:\/\/packages.cloud.google.com\/apt\/doc\/apt-key.gpg | apt    -key add -\nOK\n# cat &lt;&lt;EOF &gt;\/etc\/apt\/sources.list.d\/kubernetes.list\n&gt; deb https:\/\/apt.kubernetes.io\/ kubernetes-xenial main\n&gt; EOF\n# apt-get update\n# apt-get install -y kubelet kubeadm kubectl\n#  kubeadm version -o yaml\nclientVersion:\n  buildDate: &quot;2021-06-16T12:57:56Z&quot;\n  compiler: gc\n  gitCommit: 092fbfbf53427de67cac1e9fa54aaa09a28371d7\n  gitTreeState: clean\n  gitVersion: v1.21.2\n  goVersion: go1.16.5\n  major: &quot;1&quot;\n  minor: &quot;21&quot;\n  platform: linux\/arm64\n#  cat \/proc\/sys\/net\/bridge\/bridge-nf-call-iptables\n1\n$ kubeadm version\nkubeadm version: &version.Info{Major:&quot;1&quot;, Minor:&quot;21&quot;, GitVersion:&quot;v1.21.2&quot;, GitC    ommit:&quot;092fbfbf53427de67cac1e9fa54aaa09a28371d7&quot;, GitTreeState:&quot;clean&quot;, BuildDat    e:&quot;2021-06-16T12:57:56Z&quot;, GoVersion:&quot;go1.16.5&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux\/a    rm64&quot;}\n# swapoff -a\n# kubeadm init --pod-network-cidr=10.244.0.0\/16\n[init] Using Kubernetes version: v1.21.2\n{\u4e2d\u7565}\nYour Kubernetes control-plane has initialized successfully!\n\nTo start using your cluster, you need to run the following as a regular user:\n\n  mkdir -p $HOME\/.kube\n  sudo cp -i \/etc\/kubernetes\/admin.conf $HOME\/.kube\/config\n  sudo chown $(id -u):$(id -g) $HOME\/.kube\/config\n\nAlternatively, if you are the root user, you can run:\n\n  export KUBECONFIG=\/etc\/kubernetes\/admin.conf\n\nYou should now deploy a pod network to the cluster.\nRun &quot;kubectl apply -f [podnetwork].yaml&quot; with one of the options listed at:\n  https:\/\/kubernetes.io\/docs\/concepts\/cluster-administration\/addons\/\n\nThen you can join any number of worker nodes by running the following on each as root:\n\nkubeadm join 192.168.68.111:6443 --token iuzu6k.j2arujghto188qq1 \\\n        --discovery-token-ca-cert-hash sha256:bed560334a382d997a48491083e569dbaaac8b1a6d8804c9b917b8596d36b255\n<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ sudo cp -i \/etc\/kubernetes\/admin.conf $HOME\/.kube\/config\n$ sudo chown $(id -u):$(id -g) $HOME\/.kube\/config\n\n$  kubectl get node\nThe connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port?\n<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306e\u53c2\u7167\u5143\uff1a\u30e9\u30ba\u30d1\u30a4\u3067Kubernetes\u30af\u30e9\u30b9\u30bf\u3092\u69cb\u7bc9\u3059\u308b \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306e\u74b0\u5883 rock pi4 4GB RAM Linux rock 4.4.154-110-rockchip-gcef30e88a9f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-259","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"featured_image_src":null,"author_info":{"display_name":"mars","author_link":"https:\/\/rfsec.ddns.net\/db\/?author=1"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=259"}],"version-history":[{"count":2,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/259\/revisions"}],"predecessor-version":[{"id":263,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/259\/revisions\/263"}],"wp:attachment":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}