Info | ||
---|---|---|
| ||
Although the exciting instructions on Steps described in this page are working for kubernetes, the cluster configuration part is still working in progress. Will be updated as soon as it becomes available.run by "ubuntu", a non-root user. |
This page describes the steps of using rancher (rancher environment) to deploy Kubernetes node and config Kubernetes cluster nodes.
Table of Contents |
---|
Deploy The First Kubernetes Node
This section, similar as Quickstart Installation in ONAP on Kubernetes, provides the instruction of setting kubernestes deploying Kubernetes node through Rancher. The steps described on this page include using rancher to configure clustered kubernetes nodes - keep this page, the parent and the linked pages all in sync
Table of Contents |
---|
The first Kubernetes node in the Kubernetes cluster is to be deployed on the rancher server VM which also is configured with ranch client running.
Setup Rancher Server
...
Follow the steps below to install and configure Rancher:
# | Purpose | Command and Example | |||||
---|---|---|---|---|---|---|---|
1 | Add host name to /etc/hosts fileAdding all cluster nodes to /etc/hosts file 1on each node | sudo vi /etc/hosts
| |||||
2 | Clone the OOM project from ONAP gerrit | git clone http://gerrit.onap.org/r/oom | |||||
2 | Install/Start Rancher serverThere may be issues with the DNS pod in Rancher after a reboot or when running clustered hosts as described in ONAP bug: A clean system is OK. | 3 | |||||
Expand | |||||||
| 4 | Install/Start Rancher server 3 | Only on master node (if you are installing more than one Kubernetes nodes), Use port 8880 instead of 8080. docker run -d --restart=unless-stopped -p 8880:8080 rancher/server:v1.6.10
|
Notes:
...
|
Configure Rancher Client
You can access the Rancher UI through http:<master <master node host IP>:8880 ; it takes you to the apps/stacks page.
...
# | Purpose | Script shots illustrated steps | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Create Rancher environment: |
| ||||||||||||||||||||
2 | Add host to INFRASTRUCTURE |
| ||||||||||||||||||||
3 | Confirm that the host process has completed | The end of adding the host operation is indicated by the CLI option shown under the KUBERNETES dropdown menu:
|
Install kubectl
kubectl is a command line interface for running commands against Kubernetes clusters.
Configure Kubernetes Cluster Nodes
Repeat the following steps as many times as the number of nodes you are going to have in the Kubernetes cluster.Follow the steps below to install kubectrl:
# | Purpose | Command and Example | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Download kubectl on the server | Add host name to /etc/hosts fileAdding all cluster nodes to /etc/hosts file on each node | sudo vi /etc/hostscurl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
| |||||||||
2 | Enable the kubectl command | chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin/kubectl | ||||||||||
| ||||||||||||
2 | Add host to INFRASTRUCTURESee examples from step 2 of section "Configure Rancher Client" |
| 3 | Generate Config from the Rancher UI |
| generated config
| use it in next step:4 | Create the kube config
| mkdir ~/.kube vi ~/.kube/config Paste the generated config from rancher UI (from last step) to this file, then save the file. | 5 | Validate the kube config | |
Expand | ||||||||||||
|
Configure Kubernetes Cluster
...
| ||
3 | Confirm that the Setup has Finished | Wait until all hosts in Rancher show green, indicating that setup is complete! |