Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minikube docs post rename #1332

Merged
merged 1 commit into from
Jun 27, 2018

Conversation

bobcatfish
Copy link
Contributor

@bobcatfish bobcatfish commented Jun 23, 2018

The docs for setting up minikube were using the namespaces and
resource names from elafros instead of knative. The naming changed
slightly, e.g. a knative controller is now called controller
instead of knative-serving-controller, so one of the loops had
to be broken into 2 statements.

Added steps about redeploying pods after setting up GCR
secrets b/c there is a chicken and egg problem where the namespaces
must exist before you can setup the secrets, but the secrets must
exist before the images can be pulled.

The PR that enabled MutatingAdmissionWebhook by default
(kubernetes/minikube#2547) was merged, but
the latest minikube (0.28.0) still did not enable this option
by default b/c providing any arugments overrides all of the defaults,
so we must still set it explicitly.

Made it clear in the setting up knative serving docs that the cluster
admin binding is required, not just for istio.

Proposed Changes

  • Update minikube and GCR for minikube docs
NONE

@google-prow-robot google-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 23, 2018
@bobcatfish bobcatfish force-pushed the minikube_doc_update branch 3 times, most recently from 1dc6984 to c9fcbc0 Compare June 23, 2018 22:45
@google-prow-robot google-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 23, 2018
kubectl apply -f ./third_party/istio-0.8.0/istio.yaml
```

Then label namespaces with `istio-injection=enabled`:
Optionally label namespaces with `istio-injection=enabled`:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tcnghia this IS optional right? I don't enable injection for any of my non-default namespaces, and it's not enabled for the e2e namespaces in the automated tests, and things still work, but I'm not sure if that's intentional

@trisberg
Copy link
Member

I saw some issues with the image pull secrets following the sequence in the docs. worked better when first creating the knative-serving namespace and the service account using:

ko apply -f config/100-namespace.yaml
ko apply -f config/200-serviceaccount.yaml

and then adding the imagePullSecret to the "controller" service account before doing the full knative-serving deploy.

@bobcatfish
Copy link
Contributor Author

worked better when first creating the knative-serving namespace and the service account using:

kk, I'll update the docs, thanks @trisberg !

@bobcatfish bobcatfish force-pushed the minikube_doc_update branch 3 times, most recently from ee7e5f1 to 01805ed Compare June 25, 2018 18:45
1. Deploy the rest of Knative:
```bash
ko apply -f config/
```
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trisberg The instructions are a bit rough, let me know if you can think of a clearer way of explaining this, or if I've missed anything!

(I also found this a more reliable sequence of actions than recreating the controllers, etc., after deploying!)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's hard because these steps depend on the GCR instructions below. I think it is fine the way it you have it now

@bobcatfish
Copy link
Contributor Author

image

/test pull-knative-serving-go-coverage

ko apply -f config/
```

1. [Enable log and metric collection](../DEVELOPMENT.md#enable-log-and-metric-collection)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should mention that 8GB might not be enough for the elasticsearch components - I've found that 12GB works better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added!

DEVELOPMENT.md Outdated

### Deploy Istio
1. [Make your user a cluster admin](#setup-cluster-admin)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one more thing, don't think you need this for minikube, I always run without this step

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, removed!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... okay it wasn't removed but NOW it will be :D

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually - since this is in DEVELOPMENT.md it covers both Minikube and GKE, so we should leave it in and maybe add a comment that it can be skipped for Minikube

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol thanks for catching this, just re-fixed it XD

cluster, e.g. [GCR](#minikube-with-gcr), you will need to deploy Knative
itself a bit differently:

1. [Deploy istio](../DEVELOPMENT.md#deploy-istio)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add: For Minikube replace LoadBalancer with NodePort using:

sed 's/LoadBalancer/NodePort/' third_party/istio-0.8.0/istio.yaml | \
  kubectl apply -f -

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will add that! that might actually solve most of #609 I have a feeling - I want to follow up and see if we can make this process a bit more automatic for the minikube case as well.

for prefix in ela build; do
kubectl create secret docker-registry "gcr" \
export [email protected]
for prefix in knative-serving build; do
Copy link
Member

@trisberg trisberg Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the knative-serving namespace no longer has a system suffix, I suspect that this will need to be adjusted again if the build namespace changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah i missed that, thanks @trisberg !!

@evankanderson
Copy link
Member

/approve

I'm going to let @trisberg do the /lgtm, assuming that I understand how Prow works.

@google-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bobcatfish, evankanderson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-prow-robot google-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 27, 2018
@evankanderson
Copy link
Member

/assign @trisberg


(Then optionally [enable istio injection](../DEVELOPMENT.md#deploy-istio).)

1. [Deploy build](../DEVELOPMENT.md#deploy-build)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think at this point i should duplicate this line in this doc, since the rest of the steps are explicit

The docs for setting up minikube were using the namespaces and
resource names from elafros instead of knative. The naming changed
slightly, e.g. a knative controller is now called `controller`
instead of `knative-serving-controller`, so one of the loops had
to be broken into 2 statements.

Added steps about redeploying pods after setting up GCR
secrets b/c there is a chicken and egg problem where the namespaces
must exist before you can setup the secrets, but the secrets must
exist before the images can be pulled.

The PR that enabled `MutatingAdmissionWebhook` by default
(kubernetes/minikube#2547) was merged, but
the latest minikube (0.28.0) still did not enable this option
by default b/c providing any arugments overrides all of the defaults,
so we must still set it explicitly.

Made it clear in the setting up knative serving docs that the cluster
admin binding is required, not just for istio.

Use a `NodePort` instead of a `LoadBalancer`
(see kubernetes/minikube#384) - another
step along the road to #608.
@trisberg
Copy link
Member

/lgtm

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 27, 2018
@google-prow-robot google-prow-robot merged commit 8752b6b into knative:master Jun 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants