Skip to content

Commit

Permalink
update README & gke-replicaset.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Guus van Weelden committed Dec 7, 2017
1 parent 96c717e commit f9892fb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
9 changes: 7 additions & 2 deletions cmd/nodeset-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ Create the service account token as a secret:

``` shell
$ gcloud iam service-accounts keys create secret.json --iam-account=nodeset@<PROJECT>.iam.gserviceaccount.com
$ jq -r ".private_key" secret.json > private_key
$ kubectl create secret generic nodeset-gcloud-service-account --from-file=private_key --namespace kube-system
$ kubectl create secret generic nodeset-gcloud-service-account --from-file=SERVICE_ACCOUNT_FILE.json --namespace kube-system
```

Update the specific values in the `gke-replicaset.yaml`

* `gke-cluster-id`
* `gke-project-id`
* `gke-zone`

Create the ReplicaSet:

``` shell
Expand Down
16 changes: 12 additions & 4 deletions cmd/nodeset-controller/gke-replicaset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,31 @@ spec:
app: kube-node
controller: nodeset
spec:
volumes:
- name: gcp-account
secret:
secretName: nodeset-gcloud-service-account
containers:
- name: controller
image: kubenode/nodeset-controller:latest
command:
- /nodeset-controller
args:
- --backend=gke
- --gke-cluster-id=CLUSTER
- --gke-project-id=PROJECT_ID
- --gke-zone=ZONE
- --logtostderr
- --v=5
imagePullPolicy: Always
resources:
requests:
cpu: 100m
memory: 300Mi
volumeMounts:
- name: gcp-account
readOnly: true
mountPath: "/etc/gcp"
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
valueFrom:
secretKeyRef:
name: nodeset-gcloud-service-account
key: private_key
value: "/etc/gcp/secret.json"

0 comments on commit f9892fb

Please sign in to comment.