forked from bluek8s/kubedirector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bringing the READMEs in line with recent code changes. Need to update the wiki next. Also some tweaks to the example YAML.
- Loading branch information
1 parent
3008211
commit 5f66315
Showing
7 changed files
with
62 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: "kubedirector.bluedata.io/v1alpha1" | ||
kind: "KubeDirectorCluster" | ||
metadata: | ||
name: "centos7-persistent" | ||
spec: | ||
app: centos7x | ||
roles: | ||
- id: singlehost | ||
members: 1 | ||
resources: | ||
requests: | ||
memory: "4Gi" | ||
cpu: "2" | ||
limits: | ||
memory: "4Gi" | ||
cpu: "2" |
File renamed without changes.
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -4,35 +4,42 @@ If you're starting from scratch with GKE, the first few sections of the [GKE Qui | |
|
||
With gcloud configured to use the appropriate project, you can then launch a GKE cluster. For example, this gcloud command will create a 3-node GKE cluster named "my-gke": | ||
```bash | ||
gcloud container clusters create my-gke --machine-type n1-highmem-4 | ||
gcloud container clusters create my-gke --machine-type n1-highmem-4 | ||
``` | ||
(See [the Machine Types list](https://cloud.google.com/compute/docs/machine-types) for the details of the available GKE node resources.) | ||
|
||
If you need to grow your GKE cluster you can use gcloud to do that as well; for example, growing to 5 nodes: | ||
```bash | ||
gcloud container clusters resize my-gke --size=5 | ||
gcloud container clusters resize my-gke --size=5 | ||
``` | ||
|
||
Once your GKE cluster has been created, you will need to set up your kubectl credentials to access it. First, create a kubectl config context for the cluster: | ||
```bash | ||
gcloud container clusters get-credentials my-gke | ||
gcloud container clusters get-credentials my-gke | ||
``` | ||
|
||
And to deploy KubeDirector into this cluster, you will need for the user in that kubectl context (which is tied to your Google account credentials) to have the cluster-admin role in the cluster. | ||
```bash | ||
# This should be the email that is associated with the Google account that | ||
# gcloud is using. | ||
ACCOUNT="[email protected]" | ||
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=${ACCOUNT} | ||
# This should be the email that is associated with the Google account that | ||
# gcloud is using. | ||
ACCOUNT="[email protected]" | ||
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=${ACCOUNT} | ||
``` | ||
|
||
From here you can proceed to deploy KubeDirector and work with virtual clusters normally. Cf. the other doc files such as [quickstart.md](quickstart.md) and [virtual-clusters.md](virtual-clusters.md). | ||
From here you can proceed to deploy KubeDirector as described in [quickstart.md](quickstart.md). | ||
|
||
When you're finished, you can destroy the GKE cluster: | ||
Note that after deploying KubeDirector but before creating virtual clusters, you will want to apply a KubeDirector configuration suitable for GKE: | ||
```bash | ||
gcloud container clusters delete my-gke | ||
kubectl create -f deploy/example_config/cr-config-gke.yaml | ||
``` | ||
|
||
This will also delete the related context from the kubectl config. | ||
Now you can deploy virtual clusters as described in [virtual-clusters.md](virtual-clusters.md). | ||
|
||
When you're finished working with KubeDirector, you can destroy the GKE cluster: | ||
```bash | ||
gcloud container clusters delete my-gke | ||
``` | ||
|
||
This will also delete the related context from your kubectl config. | ||
|
||
If you have some other context that you wish to return to using at this point, you will want to run "kubectl config get-contexts" to see which contexts exist, and then use "kubectl config use-context" to select one. |
This file contains 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
This file contains 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