Update _index.md

This commit is contained in:
Denise
2018-07-20 20:44:35 -07:00
committed by GitHub
parent 93adecce18
commit 7163dfb632
@@ -7,81 +7,69 @@ aliases:
- /rancher/v2.x/en/concepts/resources/
---
After you provision a Kubernetes cluster in Rancher, you can begin using powerful Kubernetes features from the Rancher UI to manage the cluster, allowing you to deploy and scale your containerized applications in development, testing, or production environments.
After you provision a Kubernetes cluster in Rancher, you can begin using powerful Kubernetes features from the Rancher to manage the cluster, allowing you to deploy and scale your containerized applications in development, testing, or production environments.
## Advanced Cluster Interaction
## Interacting with Clusters
Although the primary method of interacting with your Kubernetes clusters is the Rancher UI, you have additional options for controlling your clusters:
- **Rancher UI**
Rancher provides an intuitive user interface to allow you to interact with your Kubernetes clusters. All options that are provided in the UI are using the Rancher API, so anything that can be done in the UI is possible to do using the Rancher CLI or Rancher API.
- **kubectl**
You can use the Kubernetes command-line tool, [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/), to control your clusters. You have two options for using kubectl:
You can use the Kubernetes command-line tool, [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/), to manage your clusters. You have two options for using kubectl:
- **Rancher kubectl shell**
You can interact with your clusters by launching the kubectl shell available in the Rancher UI. This option requires no configuration actions on your part.
You can interact with your clusters by launching a kubectl shell available in the Rancher UI. This option requires no configuration actions on your part.
For more information, see [Accessing Clusters with kubectl Shell]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/kubectl/#accessing-clusters-with-kubectl-shell).
- **Terminal remote connection**
You can also interact with your clusters by installing [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) and then copying your cluster's kubeconfig file from the Rancher UI to your local `~/.kube/config` directory.
You can also interact with your clusters by installing [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) on to your local desktop and then copying the cluster's kubeconfig file to your local `~/.kube/config` directory.
For more information, see [Accessing Clusters with kubectl and a kubeconfig File]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/kubectl/#accessing-clusters-with-kubectl-and-a-kubeconfig-file).
- **Rancher CLI**
You can interact with your clusters by downloading Rancher's own command-line interface, [Rancher CLI]({{< baseurl >}}/rancher/v2.x/en/cli/).
You can interact with your clusters by downloading Rancher's own command-line interface, [Rancher CLI]({{< baseurl >}}/rancher/v2.x/en/cli/). Rancher's CLI tool has the ability to interact directly with different clusters and projects as well as run `kubectl` commands on these clusters.
- **Rancher API**
Finally, you can interact with your clusters over the Rancher API. However, before you use the API, you must obtain an [API key]({{< baseurl >}}/rancher/v2.x/en/user-settings/api-keys/) using the Rancher UI.
Finally, you can interact with your clusters over the Rancher API. However, before you use the API, you must obtain an [API key]({{< baseurl >}}/rancher/v2.x/en/user-settings/api-keys/) using the Rancher UI. In order to view the different resource fields and actions of an API object, you can find these parameters in the API UI, which can be found by clicking on **View in API** on any object within Rancher's UI.
## Node Management
## Editing Clusters
After you launch a cluster, you can edit many of the settings you configured during its initial launch, including:
After you launch a cluster, you can edit many of the settings you configured during its initial launch. For any type of cluster, you can edit the cluster membership. The cluster membership includes the users that can access the cluster as well as their roles within the cluster, using [members]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#membership-and-role-assignment) and [roles]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles).
- The users that can access the cluster, using [members]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#membership-and-role-assignment) and [roles]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles).
- Its [Kubernetes options]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/options/), including:
Depending on how you provisioned your clusters, you have different options available for editing your cluster size and options of your cluster.
- The version of Kubernetes installed.
- Whether the cluster allows unsupported versions of Docker to run.
- Whether the cluster uses a cloud provider.
- Whether the cluster applies a pod security policy.
- For clusters provisioned in a [hosted kubernetes provider]({{< baseurl>}}/rancher/v2.x/en/cluster-provisioning/hosted-kubernetes-clusters/), you can edit the options that were made available during cluster provisioning. These options are dependent on your hosted kubernetes provider.
- For any clusters where [Rancher Launched Kubernetes]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/),there are many options that you can edit.
>**Note:** You cannot edit the cluster's Network Provider after its initial launch.
- [Kubernetes options]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/options/), including:
- The version of Kubernetes installed.
- Whether the cluster allows unsupported versions of Docker to run.
- Whether the cluster uses a cloud provider.
- Whether the cluster applies a pod security policy.
- The [node pools]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/#node-pools) configured for the cluster.
>**Note:** You cannot edit the cluster's network provider after its initial launch.
- The scale and [roles of your nodes]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/#kubernetes-cluster-node-components) can be updated based on if you launched [node pools]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/#node-pools) or have [custom nodes]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/custom-nodes/).
- For node pools, you can add/remove/edit node pools to the cluster. Remember that node pools are set to a specific scale, so removing nodes individually will not cause any changes to the size of the cluster unless you actually change the scale of the node pool.
- For custom nodes, you are provided the Docker command to add nodes or it can be used to edit the roles of existing nodes. If you want to remove nodes, you would need to go to the **Nodes** page of the cluster and delete the nodes you want to remove.
For instructions on how to edit a cluster's settings, see [Editing Clusters]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/editing-clusters).
Additionally, you can also edit individual nodes using the **Nodes** tab, from which you can complete the following actions:
- Enter custom names and descriptions for each node.
- Add [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to each node.
- Pause nodes using the **Cordon** button.
- **Delete** nodes.
- Scale the number of nodes in the cluster up or down.
- Download the access keys for each node.
To see what is available to edit your cluster's settings, see [Editing Clusters]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/editing-clusters).
## Projects and Namespaces
In use cases where many users share use of a cluster, you can divide it into different [namespaces](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) and [projects]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/projects-and-namespaces/) to prevent conflicts.
In order to support multi-tenancy on a cluster, Rancher [projects]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/projects-and-namespaces/) can be created, which allow you to group several [namespaces]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/projects-and-namespaces/#namespaces) into a single object. You can set user access and pod security policies to each project, which allows groups of users to access different sets of namespaces while using the same cluster. Projects are a feature available in Rancher, but not the base version of Kubernetes.
- [Namespaces]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/projects-and-namespaces/#namespaces)
Namespaces are objects you can use to restrict cluster resources among groups of users and applications. Using namesspaces, you can limit the cluster objects that users can access, including:
- **[Workloads](#workloads)**: standard workloads, load balancers, service discovery records, and storage.
- **[Resources](#kubernetes-resources)**: certificates, ConfigMaps, registries, and secrets.
- [Projects]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/projects-and-namespaces/)
Projects are a feature available in Rancher, but not the base version of Kubernetes. Projects allows you to group different namespaces into a single object. You can then use your project to set user access and pod security policies using a single object (the project) rather than many (namespaces).
You can also assign the workloads and resources mentioned above to a project. Therefore, any resources available within a project are available for all namespaces within that project.
For more information on creating projects and attaching objects and membership to them, see:
For more information on how to manage projects, see:
- [Projects and Namespaces]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/projects-and-namespaces/)
- [Project Members]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/projects-and-namespaces/project-members/)
@@ -90,7 +78,7 @@ For more information on creating projects and attaching objects and membership t
Deploy applications to your cluster nodes using [workloads]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/workloads/), which are objects that contain pods that run your apps, along with metadata that set rules for the deployment's behavior. Workloads can deployed within the scope of the entire clusters, or within a namespace.
When deploying a workload, you can deploy any application hosted on [Docker Hub](https://hub.docker.com/). There are variety of [workload types]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/workloads/#workload-types) to choose from.
When deploying a workload, you can deploy from any image. There are variety of [workload types]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/workloads/#workload-types) to choose from to determine how your application should run.
Following a workload deployment, you can continue working with it. You can:
@@ -117,7 +105,7 @@ For more information, see [load balancers]({{< baseurl >}}/rancher/v2.x/en/kuber
Load Balancers can only handle one IP address per service, which means if you run multiple services in your cluster, you must have a load balancer for each service. Running multiples load balancers can be expensive. You can get around this issue using an ingress.
Ingress is a set or rules that act as a load balancer. Ingress works in conjunction with one or more ingress controllers to dynamically route service requests. When the ingress receives a request, the ingress controller(s) in your cluster program the ingress to direct the request to the correct service based on service subdomains or path rules that you've configured.
Ingress is a set or rules that act as a load balancer. Ingress works in conjunction with one or more ingress controllers to dynamically route service requests. When the ingress receives a request, the ingress controller(s) in your cluster program the load balancer to direct the request to the correct service based on service subdomains or path rules that you've configured.
For more information, see [Ingress]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/load-balancers-and-ingress/ingress).
@@ -129,19 +117,19 @@ For more information, see [Service Discovery]({{< baseurl >}}/rancher/v2.x/en/ku
## Volumes and Storage
For workloads that need to retain their state, you must add external storage for the workload. Storage volumes are locations outside your of your pods where applications can store their data. Because the storage is external to the workload, if a container fails, the container that replaces it can restore the external data, making recovery appear seamless.
For workloads that need to retain their state, you must add external storage for the workload. Storage volumes are locations outside of your pods where applications can store their data. Because the storage is external to the workload, if a container fails, the container that replaces it can restore the external data, making recovery appear seamless.
Within Rancher, you can create persistent storage using one of two methods:
- [Persistent Volumes]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/volumes-and-storage/#persistent-volumes)
Persistent volumes are pre-provisioned storage volumes that you can bind to pods later using Persistent Volume Claims.
Persistent volumes are pre-provisioned storage volumes that you can bind to pods later using persistent volume claims.
- [Storage Classes]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/volumes-and-storage/#storage-classes)
Storage classes are objects that provision storage volumes upon request. When a pod submits a Persistent Volume Claim to the storage class, the class creates a storage volume for the pod.
Storage classes are objects that provision storage volumes upon request. When a pod submits a persistent volume claim to the storage class, the class creates a storage volume for the pod.
After you deploy a workload, they request storage using a [Persistent Volume Claim]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/volumes-and-storage/persistent-volume-claims), which is like a voucher used to claim storage space available within the cluster.
After you deploy a workload, they request storage using a [persistent volume claim]({{< baseurl >}}/rancher/v2.x/en/kubernetes-in-rancher/volumes-and-storage/persistent-volume-claims), which is like a voucher used to claim storage space available within the cluster.
## Kubernetes Resources