Introduction
Rancher provides a web UI and proxy for managing Kubernetes clusters. Using Rancher is an easy way to streamline cluster deployment on bare metal and private/public clouds.
This article shows you how to set up a Rancher-controlled cluster using the phoenixNAP BMC portal.
Prerequisites
- phoenixNAP BMC portal credentials (If you are a new client, create a BMC account. Or, if you prefer, watch the video instructions for BMC account creation.)
- SSH key pair (If you need help, learn how to generate SSH keys.)
Step 1: Create a Kubernetes Cluster
1. Log in to BMC Portal.
2. Select Solutions in the menu on the left side of the screen.
3. Click the Create Kubernetes Cluster button in the Rancher on Bare Metal Cloud tile.
The Create a Cluster page appears.
4. Select a data center location for the cluster in the Location section.
5. Give a name to your cluster and provide a description in the Cluster Settings section.
6. Click Next in the lower left corner to move to the Add Nodes page.
Step 2: Add Nodes
1. Use the dropdown menu to choose the number of nodes for your cluster. You can choose between a single node and a three-node cluster.
2. Select a BMC server configuration. There are multiple BMC server instances available.
3. When you select a configuration, more details appear on the right side of the screen. Click the Next button to proceed to the Node Settings page.
Note: The prices listed in this guide are for illustrative purposes only.
Step 3: Node Settings
1. Add one or more previously generated SSH keys in the Access section of the Node Settings by typing the key name. If you need to add more than one key, select Add a new Public SSH Key below the text box.
Note: At least one public SSH key is needed to continue with the Rancher setup.
2. A Rancher server must be publicly accessible. The Public IP Settings section informs you what type of IP allocation your server will be assigned and provides pricing for the allocation.
3. To modify Rancher settings before the installation, select the checkbox next to the “Yes, configure advanced Rancher settings” option in the Advanced Configuration Settings section. Leave the checkbox unselected to use the default settings.
4. If you don’t opt for advanced configuration, click Create Kubernetes Cluster to start the installation process. Rancher installs with the default settings.
If you choose advanced configuration, the Next button appears instead. Click the button to modify the settings.
Step 4 (Optional): Advanced Configuration Settings
The Advanced Configuration Settings page has six sections.
Access Token
The first server node uses the access token to authenticate all subsequent nodes added to the cluster. If you do not want to generate the access token automatically:
1. Click Set Access Token. The section expands.
2. Set the token in the text box.
Certificate
Rancher uses Rancher-generated digital certificates to confirm public key ownership. If you have other trusted certificates:
1. Click Add Certificates.
2. Enter your private SSH key pair (2), a certificate (3), or a self-signed CA certificate (4).
TLS Settings
The tls-san parameter allows you to list alternative hostnames and IP addresses on your TLS certificate. To set the tls-san parameter:
1. Select Set TLS Settings (tls-san).
2. Enter the hostnames or addresses in the text box. Separate multiple entries with a comma or a white space.
Node Taints
Placing a node taint prevents pods from scheduling on the node unless they have declared toleration in the pod specification. This feature enables you to specify the nodes where you don’t want workloads to run.
To place a node taint:
1. Click Set Node Taints (node-taint)
2. Type the node-taint parameter into the text box.
Cluster Domain
The default name for your cluster is cluster.local. To use a different name, set the cluster-domain parameter:
1. Select Set Domain Name (cluster-domain).
2. Provide the wanted cluster domain into the text box.
Backup Snapshots
Configure backup snapshots for your cluster to protect it against data loss:
1. Select Schedule Snapshots.
2. Use cron format to provide the time interval for taking snapshots.
3. Provide the number of snapshots you want available.
When you finish the advanced setup, click Create Kubernetes Cluster at the bottom of the page. The Welcome to Rancher dialogue appears.
Step 5: Start Rancher
1. Click the icon to copy the password for your Rancher administrative account. You need this password when logging into Rancher for the first time.
2. Select the checkbox to acknowledge that the password you received is temporary.
3. The IP address of your Rancher server is at the bottom of the dialogue box. You will use the address or the hostname to access your Rancher server. Copy the IP address by clicking the icon.
4. Click Close. The cluster appears on the list of available Rancher clusters.
The dashboard has a number of columns for sorting available clusters according to their name, location, number of nodes, status, CPU, memory, and storage.
Step 6: Launch Rancher UI
To start using Rancher on your cluster:
1. Click the Actions link of the relevant cluster in the Manage column.
2. Select Launch Rancher UI.
Your browser redirects you to the Rancher login page. Log in with your credentials to start using the Rancher options.
Manage Rancher Clusters
After you create your first cluster, the Manage Your Clusters link appears on the Solutions page. Click the link to access the Rancher cluster dashboard.
The dashboard enables you to view the details of your cluster and to delete it.
Note: Rolling updates are crucial aspects of the development life cycle as users expect zero downtime. Learn how to configure Kubernetes clusters for rolling updates. Follow our guide to navigate through updates with zero downtime.
View Cluster Details
To view details about your cluster, such as server configuration, billing and networking:
1. Click the Actions link of the relevant cluster in the Manage column.
2. Select View Details.
Delete a Cluster
To permanently delete a cluster:
1. Click the Actions link of the relevant cluster in the Manage column.
2. Select Delete Cluster.
3. Enter the name of the cluster into the text box to confirm .
4. Click Delete Cluster.
Warning: Deleting the cluster cannot be reversed.
Highly Available RKE clusters
Rancher Kubernetes Engine clusters can be set up for high availability. Highly available (HA) clusters provide continuous availability by featuring software redundancy. Multiple machines are configured to perform the same function, so they are ready to provide backup in case one of the component fails.
HA clusters are used in database management, transaction processing, eCommerce, and other applications that require constant availability.
Highly available architectures are designed to:
- Detect a failure within the system
- Perform application failover to an available backup host
- Automatically restart or repair the server that failed.
Note: At this moment, RKE clusters can be highly available, but worker nodes cannot. Worker nodes can be post configured for higher availability.
Conclusion
This tutorial walked you through the steps necessary to set up Rancher integration on the BMC portal. If you need further assistance regarding Rancher, contact our Support Team.
原创文章,作者:kirin,如若转载,请注明出处:https://blog.ytso.com/224104.html