Skip to content

Commit

Permalink
Merge pull request #283 from surbas/patch-1
Browse files Browse the repository at this point in the history
Change blockquotes to code blocks
  • Loading branch information
k8s-ci-robot committed Jun 25, 2018
2 parents ed1ba83 + f8684ab commit b12cdd0
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions docs/book/basics/what_is_the_controller_manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,30 @@ may sometimes run multiple instances even with replicas set to 1).

Build and run locally against the cluster defined in ~/.kube/config.

> GOBIN=${PWD}/bin go install ${PWD#$GOPATH/src/}/cmd/controller-manager
> ./bin/controller-manager --kubeconfig ~/.kube/config
```bash
# Build It.
GOBIN=${PWD}/bin go install ${PWD#$GOPATH/src/}/cmd/controller-manager

# Run It.
./bin/controller-manager --kubeconfig ~/.kube/config
```

In another terminal, create the sample resource.

> kubectl apply -f hack/sample/containerset.yaml
`kubectl apply -f hack/sample/containerset.yaml`

{% panel style="info", title="Building and Running a Controller-Manager Container" %}
The image for the Controller-Manager maybe built using the `Dockerfile.controller` Dockerfile.

> docker build . -t gcr.io/containerset/controller -f Dockerfile.controller
> docker push gcr.io/containerset/controller
```bash
docker build . -t gcr.io/containerset/controller -f Dockerfile.controller
docker push gcr.io/containerset/controller
```

The yaml configuration for the Controller-Manager maybe created with
`kubebuilder create config --image gcr.io/containerset/controller --name containerset`
This will create the `hack/install.yaml` file to install the Controller-Manager.

> kubectl apply -f hack/install.yaml
`kubectl apply -f hack/install.yaml`

{% endpanel %}

0 comments on commit b12cdd0

Please sign in to comment.