kubernetes-the-hard-way/docs/05-kubernetes-configuration...

191 lines
6.0 KiB
Markdown
Raw Normal View History

2017-08-29 00:19:25 +03:00
# Generating Kubernetes Configuration Files for Authentication
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
In this lab you will generate [Kubernetes configuration files](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/), also known as "kubeconfigs", which enable Kubernetes clients to locate and authenticate to the Kubernetes API Servers.
Note: It is good practice to use file paths to certificates in kubeconfigs that will be used by the services. When certificates are updated, it is not necessary to regenerate the config files, as you would have to if the certificate data was embedded. Note also that the cert files don't exist in these paths yet - we will place them in later labs.
Adjust markdown formatting (#328) * Adjust markdown formatting: * Remove extra capitalization. * Remove extra curly braces {} inside Bash code blocks. * Use in-line code block `` for IP-addresses, file names and commands. * Add a dot at the end of sentences. * Use list formatting in `differences-to-original.md`. Also add escaping for angle brackets <>. * No logic changes were made, only formatting improvements. * 01-prerequisites.md: remove extra capitalization, remove extra space in "Virtual Box" * 01-prerequisites.md: split text into different lines (before, it was rendered into one line) * Remove extra capitalization, use inline code blocks, add a dot at the end of sentences. * 02-compute-resources.md: add escaping for angle brackets <>. * 03-client-tools.md: remove extra capitalization, use inline code blocks * 04-certificate-authority.md: remove extra capitalization, use inline code blocks, remove extra curly braces {} inside Bash code blocks * 04-certificate-authority.md: remove extra curly braces {} inside Bash code blocks * Revert back: all "remove extra curly braces {} inside Bash code blocks" As per @fireflycons https://github.com/mmumshad/kubernetes-the-hard-way/pull/328#issuecomment-1926329908 : > They are there for a reason. If you paste a block of code within braces, then it is not executed immediately by the shell - you have to press ENTER. Quite often when making changes to this repo and I have multiple terminals open, it gives me a chance to check that I have pasted the block into the correct terminal before it executes in the wrong terminal and borks everything. * Revert back: all "remove extra curly braces {} inside Bash code blocks" * Revert back all "Remove extra capitalization", as per request @fireflycons https://github.com/mmumshad/kubernetes-the-hard-way/pull/328#issuecomment-1944388993
2024-02-21 23:50:31 +03:00
User configs, like `admin.kubeconfig` will have the certificate info embedded within them.
2017-08-29 00:19:25 +03:00
## Client Authentication Configs
In this section you will generate kubeconfig files for the `controller manager`, `kube-proxy`, `scheduler` clients and the `admin` user.
2017-08-29 00:19:25 +03:00
### Kubernetes Public IP Address
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
Each kubeconfig requires a Kubernetes API Server to connect to. To support high availability the IP address assigned to the load balancer will be used, so let's first get the address of the loadbalancer into a shell variable such that we can use it in the kubeconfigs for services that run on worker nodes. The controller manager and scheduler need to talk to the local API server, hence they use the localhost address.
2017-08-29 00:19:25 +03:00
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
[//]: # (host:master-1)
```bash
LOADBALANCER=$(dig +short loadbalancer)
2017-08-29 00:19:25 +03:00
```
### The kube-proxy Kubernetes Configuration File
Generate a kubeconfig file for the `kube-proxy` service:
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
```bash
{
kubectl config set-cluster kubernetes-the-hard-way \
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
--certificate-authority=/var/lib/kubernetes/pki/ca.crt \
--server=https://${LOADBALANCER}:6443 \
--kubeconfig=kube-proxy.kubeconfig
kubectl config set-credentials system:kube-proxy \
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
--client-certificate=/var/lib/kubernetes/pki/kube-proxy.crt \
--client-key=/var/lib/kubernetes/pki/kube-proxy.key \
--kubeconfig=kube-proxy.kubeconfig
kubectl config set-context default \
--cluster=kubernetes-the-hard-way \
--user=system:kube-proxy \
--kubeconfig=kube-proxy.kubeconfig
kubectl config use-context default --kubeconfig=kube-proxy.kubeconfig
}
```
Results:
```
kube-proxy.kubeconfig
```
2019-11-19 13:22:52 +03:00
Reference docs for kube-proxy [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/)
### The kube-controller-manager Kubernetes Configuration File
Generate a kubeconfig file for the `kube-controller-manager` service:
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
```bash
{
kubectl config set-cluster kubernetes-the-hard-way \
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
--certificate-authority=/var/lib/kubernetes/pki/ca.crt \
--server=https://127.0.0.1:6443 \
--kubeconfig=kube-controller-manager.kubeconfig
kubectl config set-credentials system:kube-controller-manager \
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
--client-certificate=/var/lib/kubernetes/pki/kube-controller-manager.crt \
--client-key=/var/lib/kubernetes/pki/kube-controller-manager.key \
--kubeconfig=kube-controller-manager.kubeconfig
kubectl config set-context default \
--cluster=kubernetes-the-hard-way \
--user=system:kube-controller-manager \
--kubeconfig=kube-controller-manager.kubeconfig
kubectl config use-context default --kubeconfig=kube-controller-manager.kubeconfig
}
```
Results:
```
kube-controller-manager.kubeconfig
```
2019-11-19 13:22:52 +03:00
Reference docs for kube-controller-manager [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/)
### The kube-scheduler Kubernetes Configuration File
Generate a kubeconfig file for the `kube-scheduler` service:
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
```bash
{
kubectl config set-cluster kubernetes-the-hard-way \
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
--certificate-authority=/var/lib/kubernetes/pki/ca.crt \
--server=https://127.0.0.1:6443 \
--kubeconfig=kube-scheduler.kubeconfig
kubectl config set-credentials system:kube-scheduler \
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
--client-certificate=/var/lib/kubernetes/pki/kube-scheduler.crt \
--client-key=/var/lib/kubernetes/pki/kube-scheduler.key \
--kubeconfig=kube-scheduler.kubeconfig
kubectl config set-context default \
--cluster=kubernetes-the-hard-way \
--user=system:kube-scheduler \
--kubeconfig=kube-scheduler.kubeconfig
kubectl config use-context default --kubeconfig=kube-scheduler.kubeconfig
}
2017-08-29 00:19:25 +03:00
```
Results:
2017-08-29 00:19:25 +03:00
```
kube-scheduler.kubeconfig
2017-08-29 00:19:25 +03:00
```
2019-11-19 13:22:52 +03:00
Reference docs for kube-scheduler [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/)
### The admin Kubernetes Configuration File
Generate a kubeconfig file for the `admin` user:
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
```bash
{
kubectl config set-cluster kubernetes-the-hard-way \
2019-03-20 07:34:49 +03:00
--certificate-authority=ca.crt \
--embed-certs=true \
--server=https://127.0.0.1:6443 \
--kubeconfig=admin.kubeconfig
kubectl config set-credentials admin \
2019-03-20 07:34:49 +03:00
--client-certificate=admin.crt \
--client-key=admin.key \
--embed-certs=true \
--kubeconfig=admin.kubeconfig
kubectl config set-context default \
--cluster=kubernetes-the-hard-way \
--user=admin \
--kubeconfig=admin.kubeconfig
kubectl config use-context default --kubeconfig=admin.kubeconfig
}
2017-08-29 00:19:25 +03:00
```
Results:
2017-08-29 00:19:25 +03:00
```
admin.kubeconfig
2017-08-29 00:19:25 +03:00
```
2019-11-19 13:22:52 +03:00
Reference docs for kubeconfig [here](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
2019-03-20 07:34:49 +03:00
##
2017-08-29 00:19:25 +03:00
## Distribute the Kubernetes Configuration Files
Copy the appropriate `kube-proxy` kubeconfig files to each worker instance:
2017-08-29 00:19:25 +03:00
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
```bash
2019-03-20 07:34:49 +03:00
for instance in worker-1 worker-2; do
scp kube-proxy.kubeconfig ${instance}:~/
2017-08-29 00:19:25 +03:00
done
```
Copy the appropriate `admin.kubeconfig`, `kube-controller-manager` and `kube-scheduler` kubeconfig files to each controller instance:
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
```bash
2019-03-20 07:34:49 +03:00
for instance in master-1 master-2; do
scp admin.kubeconfig kube-controller-manager.kubeconfig kube-scheduler.kubeconfig ${instance}:~/
done
```
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
## Optional - Check kubeconfigs
At `master-1` and `master-2` nodes, run the following, selecting option 2
[//]: # (command./cert_verify.sh 2)
[//]: # (command:ssh master-2 './cert_verify.sh 2')
```
Upgrade/1.24 (#291) * Set up Vagrantfile - Use Ubuntu 22.04 - Set required kernel parameters and tunables - Optimise file for DRY by use of local functions - No longer install Docker * Update prerequisites * Update compute resources * Update client-tools * Update cert authority * Update kube config files * Update sata encryption keys * Update etcd * Cert enhancements - Use dig for host IPs - Create front-proxy keys * Update prereqs with lab defaults * Minor update * Dynamic kubelet reconfig removed in 1.24 * Update failed provisioning * Update cert sujects. Use vars for IP addresses * Use vars for IP addresses * USe vars for IPs. Update unit file * Unit updates for 1.24. Use vars for IPs * 1.24 changes - Update unit files - Use vars for IPs - Install containerd * Use vars for IPs. Update outputs * Remove CNI plugins - done earlier * Update API versions * Adjust VM RAM * Update coredns version and api versions * Update git ignore and attributes * Note about deprecation warning * Fix kubeconfig name * Formatting changes + pin nginx version * Update kubetest * Update README * Discuss why only 2 masters * Note on changing service cidr range vs coredns * Add RAM column to VM table * Best practice - secure PKI * Secure kubeconfig * Add prev link * Adding `Prev` links * Squashed commit of the following: commit 8fbd36069cbf7365f627e5ebf5a04e37cde085d9 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:06:10 2022 +0100 Update dns-addon test commit 5528e873ecbe3265155da48d24c24d696635af52 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:48 2022 +0100 Fix get nodes commit 0d88ab0d1c4b6a7ae05bc2552366460f741bb763 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 20:00:19 2022 +0100 Fix env var name commit e564db03ff9c4c9ef536bcc5cd999fa1e6a3de15 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:42:52 2022 +0100 Update e2e-tests commit 247a59f2c5b84e34972f396cf87a34bcbeb2d2ef Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:39:54 2022 +0100 Updated e2e-tests commit 60b33d025bb252570f41c13f90955ec8d59141a7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:38:02 2022 +0100 bashify commands in ``` commit 2814949d6dd569c59ea7ec61135784d51ad4de1f Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:35:32 2022 +0100 Note deprecation warning when deploying weave commit af0264e13e5f0e277f8f31e5115a813680aadd74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:33:55 2022 +0100 Nodes are ready at end of step 11 commit 050502386d36a8593ed7348e902cdff9ad9c64b2 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:30:00 2022 +0100 Minor change CNI commit 04bdc1483e9696ed018ac26b6480237ee1dcf1d1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:21:22 2022 +0100 Explain data at rest is in etcd commit 243154b9866f5a7a1a49037f97e38c6bf7ffbcb7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:18:49 2022 +0100 Explanation of api cluster ip commit dd168ac2e128cbd405248115d8724498fa18fa67 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:14:42 2022 +0100 Include vagrant password commit d51c65a77ac192e2468d92f0067958c69057a2e0 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:12:34 2022 +0100 Update tmux message commit 10f41737100ab410adb6b20712ee32cd80618e3d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 19:09:23 2022 +0100 Insert step to configure CNI on both workers Optionally with tmux commit 8fd873f1492f6ea1c846b3309f57740e8501adee Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 18:42:27 2022 +0100 Shuffle up to make room for common cni install commit d650443b069a7543cbb4cf449818a81d84932007 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:59 2022 +0100 Added warning output to componentstatuses commit 7bfef8f16bd1a126dcf3e5f43a02d79517d64c74 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:38 2022 +0100 Rearrange text commit b16b92bc6513cf355a41afa22ddfe2696142c28b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:34:18 2022 +0100 Minor wording change DNS arress is conventionally .10 commit 96c9d25663ce3d721e670262bb6858e9a7183873 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:32:24 2022 +0100 Use shell vars for etcd addresses commit c9e223fba5324a1c65d6f583cf9e739b8459df5d Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:31:58 2022 +0100 Update on network defaults commit 1cf98649df9410b8a7d14c68bcb17c24aa6a210a Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 07:05:38 2022 +0100 Get and install correct CNI components commit 311905fba72f4a48cde4a73c589daea9b76042b7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Thu Aug 25 06:18:55 2022 +0100 Update Approve CSR commit 4c39c84c172fde8ab2aafc4ea38b050eb7f3019b Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Wed Aug 24 20:34:53 2022 +0100 Moving certs out of service kuebeconfigs * Squashed commit of the following: commit 252cc335739e3c8007ab86c951222aba954d80f7 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:29:23 2022 +0100 Update external links commit 8091d1a13bc5a29654db2b8fecd55b8180bf8cab Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:28:14 2022 +0100 Mac M1 note commit 8b7e6065ffb74532b6ad7570a8c978addcc7fb66 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:03:11 2022 +0100 Tweak order of commands e2e tests commit 857d039dd1dff28e92d392ad6c5e40814a9eb054 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 20:02:51 2022 +0100 Fixing kubecomfig checks commit 26f42049bebd2d539406e6e16c51bb06441702f1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 15:51:13 2022 +0100 Updated cert_verify commit 0df54e4c3499e6d79b836e1dfcf74eb9fdf196b1 Author: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun Aug 28 09:09:14 2022 +0100 Rewite cert_verify Round 1 certs and kubeconfigs * Update README - Insert CNI lab - Correct CNI versions * Automate hostfile network settings Determine from interface address passed in. * Update 01-prerequisites.md * Update 01-prerequisites.md Correct the default vm ip range * Review updates. Issue 1 * Review updates. Issue 2 * Review updates. Issue 3 In actual fact, the base script is cert_verfiy.sh so the error is in the link created by the provisioner. You'll see that the later labs all refer to it with underscore. * Review updates. Issue 5 * Review updates. Issue 6 * Review updates. Issue 7 I whip through the scripts so fast, that even if I had copied it twice to my quick script, I didn't notice it say that the resource exists and is unchanged! * These certs already copied in step 4 * Formatting and command grouping * Review updates. Step 11 cert_verify Needs to be done after kublet starts as it is looking for the auto-issued cert * Group coomand batches * Remove duplicate clusterrolebinding * Extraction of scripts from md using tool This uses markdown comments and ```bash fence to determine what to extract and for which hosts Fixed shell var bug in step 11 * Fixed typos * Be specific that we're doing shutdown, not suspend * Minor edits for clarity * remove the extra \ * Rename step 9 to CRI, as that's what it actually is * Disambiguate CRI vs CNI * small fixes Co-authored-by: Tej Singh Rana <58101587+Tej-Singh-Rana@users.noreply.github.com>
2022-09-20 09:17:00 +03:00
./cert_verify.sh
```
Prev: [Certificate Authority](04-certificate-authority.md)<br>
2017-08-29 00:19:25 +03:00
Next: [Generating the Data Encryption Config and Key](06-data-encryption-keys.md)