-
Notifications
You must be signed in to change notification settings - Fork 365
rancher_and_kubernetes.md #1826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,25 +13,25 @@ tags: | |
|
|
||
| # Working with Rancher and Kubernetes | ||
|
|
||
| **Kubernetes** (**K8s**) is an open source container orchestration system for managing the deployment and management of containerized applications. | ||
| **Kubernetes** (**K8s**) is an open-source container orchestration system for managing the deployment and management of containerized applications. | ||
|
|
||
| K8S has made a name for itself on the market, so there is really no need to introduce it anymore. | ||
| K8S has made a name for itself on the market, so there is no need to introduce it anymore. | ||
|
|
||
| Cloud providers have made it easy to deploy managed Kubernetes platforms, but what about setting up and managing an on-premise cluster? | ||
|
|
||
| How easy is it to manage multiple clusters, whether on-premise or multi-cloud? | ||
|
|
||
| The answer to the last two questions are: No. Setting up an on-premise cluster is not easy, and managing a multi-cloud cluster can be a real headache. | ||
| The answer to the last two questions is No. Setting up an on-premise cluster is difficult, and managing a multi-cloud cluster can be a real headache. | ||
|
|
||
| That is where the subject of this guide comes in: **Rancher**! Rancher is also an open source system, enabling the installation and orchestration of several multi-cloud or on-premise clusters, and providing interesting features such as an application catalog and a practical web interface for visualizing resources. | ||
| That is where the subject of this guide comes in: **Rancher**! Rancher is also an open-source system, enabling the installation and orchestration of several multi-cloud or on-premise clusters and providing interesting features such as an application catalog and a practical web interface for visualizing resources. | ||
|
|
||
| Rancher will enable you to deploy Kubernetes clusters managed by cloud providers, import existing Kubernetes clusters or deploy K3S (for short, it is a lighter version of K8S) or K8S clusters. | ||
| Rancher will enable you to deploy Kubernetes clusters managed by cloud providers, import existing Kubernetes clusters, or deploy K3S (for short, it is a lighter version of K8S) or K8S clusters. | ||
|
|
||
| This guide will help you discover Rancher, install and start it, and then create an on-premise Kubernetes cluster deployed on Rocky Linux servers. | ||
|
|
||
| ## Rancher deployment | ||
|
|
||
| Installing Rancher is quite trivial, if you have Docker installed on your server. | ||
| Installing Rancher is quite trivial if you have Docker installed on your server. | ||
|
|
||
| You can find the Docker installation [here in gemstones](https://docs.rockylinux.org/gemstones/docker/). | ||
|
|
||
|
|
@@ -60,7 +60,7 @@ docker run -d --name=rancher --privileged --restart=unless-stopped -p 80:80 -p 4 | |
|
|
||
| !!! NOTE | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| If you are curious, have a look at the new container's logs. You will see that a K3S cluster (with a single node) has just been created! This is how Rancher works in its standalone version. | ||
| If you are curious, look at the new container's logs. You will see that a K3S cluster (with a single node) has just been created! This is how Rancher works in its standalone version. | ||
|
|
||
|  | ||
|
|
||
|
|
@@ -71,7 +71,7 @@ firewall-cmd --permanent --zone=public --add-service=https | |
| firewall-cmd --zone=public --add-service=https | ||
| ``` | ||
|
|
||
| If you go to the newly deployed Rancher web interface, a message will inform you how to retrieve the admin administrator password which is present in your container logs. | ||
| If you go to the newly deployed Rancher web interface, a message will inform you how to retrieve the admin administrator password in your container logs. | ||
|
|
||
| To do this, launch the following command: | ||
|
|
||
|
|
@@ -85,15 +85,15 @@ You are ready to connect to the Rancher's webUI. | |
|
|
||
| !!! NOTE | ||
|
|
||
| This solution is by no means production-ready. You will need to make sure the system is highly available, but it is a good start. Consider deploying Rancher on an existing K8S cluster for optimal HA. | ||
| This solution is by no means production-ready. You will need to ensure the system is highly available, but it is a good start. Consider deploying Rancher on an existing K8S cluster for optimal HA. | ||
|
|
||
| ## Kubernetes on Rocky Linux 9 servers | ||
|
|
||
| Rancher offers its own docker-based version of Kubernetes: RKE (Rancher Kubernetes Engine). | ||
| Rancher offers its docker-based version of Kubernetes: RKE (Rancher Kubernetes Engine). | ||
|
|
||
| All you need is several Rocky Linux servers and the [Docker engine](https://docs.rockylinux.org/gemstones/docker/) installed on them. | ||
|
|
||
| Do not forget that one of the requirements of Kubernetes is to have an odd number of master nodes (1 or 3, for example). For the purposes of our tests, start with 3 master nodes, and 2 additional nodes with only the worker role. | ||
| Do not forget that one of the requirements of Kubernetes is to have an odd number of master nodes (1 or 3, for example). For our tests, start with 3 master nodes and 2 additional nodes with only the worker role. | ||
|
|
||
| Once Docker is installed on the servers, stop `firewalld` and run `nftables` on each servers: | ||
|
|
||
|
|
@@ -112,7 +112,7 @@ In the cluster management area, create a new cluster: | |
|
|
||
|  | ||
|
|
||
| You are free to create a cluster in a hosted Kubernetes provider, provision new nodes and create a cluster using RKE2/K3s, or, and that is our case, use existing nodes and create a cluster using RKE2/K3s. | ||
| You are free to create a cluster in a hosted Kubernetes provider, provision new nodes, and create a cluster using RKE2/K3s, or, in our case, use existing nodes and create a cluster using RKE2/K3s. | ||
|
|
||
| Choose the last option. | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
K8S or K8s? (resp. K3S or K3s)
see also:
https://www.google.com/search?q=K8S
https://en.wikipedia.org/w/index.php?title=K8s&redirect=no