Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/snippets/about-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Knative Functions provides a simple programming model for using functions on Kna

Knative Functions enables you to easily create, build, and deploy [stateless](https://www.techtarget.com/whatis/definition/stateless-app){target=_blank}, [event-driven](https://en.wikipedia.org/wiki/Event-driven_programming){target=_blank} functions as Knative Services by using the `func` CLI.

When you build or run a function, an [Open Container Initiative (OCI) format](https://opencontainers.org/about/overview/){target=_blank} container image is generated automatically for you, and is stored in a container registry. Each time you update your code and then run or deploy it, the container image is also updated.
Functions can be packaged as [Open Container Initiative (OCI) images](https://opencontainers.org/about/overview/){target=_blank} without writing a Dockerfile. A local container build does not publish an image to a registry. Deployment builds and pushes an image so the cluster can pull it. Supported host builders can also run functions locally without a container.

You can create functions and manage function workflows by using the `func` CLI, or by using the `kn func` plugin for the Knative CLI.
17 changes: 0 additions & 17 deletions docs/snippets/install-func-CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,3 @@
```bash
func version
```

=== "Container image"

Run `func` from a container image. For example:

```bash
docker run --rm -it ghcr.io/knative/func/func create -l node -t http myfunc
```

Links to images are available here:

- [Latest release](https://gcr.io/knative-releases/knative.dev/client/cmd/kn){target=_blank}

!!! note
Running `func` from a container image does not place the binary on a permanent path. This procedure must be repeated each time you want to use `func`.

<!--TODO: Maybe needs an update when https://github.com/knative/func/issues/1308 is fixed-->
18 changes: 3 additions & 15 deletions docs/snippets/install-kn.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ The Knative CLI (`kn`) provides a quick and easy interface for creating Knative

The `kn` CLI also simplifies completion of otherwise complex procedures such as autoscaling and traffic splitting.

Install `kn` on your local machine so you can run it directly and use plugins
such as `quickstart`.

=== "Using Homebrew"

Do one of the following:
Expand Down Expand Up @@ -73,18 +76,3 @@ The `kn` CLI also simplifies completion of otherwise complex procedures such as
```bash
kn version
```

=== "Using a container image"

Links to images are available here:

- [Latest release](https://gcr.io/knative-releases/knative.dev/client/cmd/kn){target=_blank}

You can run `kn` from a container image. For example:

```bash
docker run --rm -v "$HOME/.kube/config:/root/.kube/config" gcr.io/knative-releases/knative.dev/client/cmd/kn:latest service list
```

!!! note
Running `kn` from a container image does not place the binary on a permanent path. This procedure must be repeated each time you want to use `kn`.
132 changes: 132 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
--site-nav-bg: #14385d;
--site-nav-text: #d4e3f4;
--site-nav-focus: #9bd5ff;
--knative-functions-color: #7a357d;
--knative-functions-background: #faf5fb;
--knative-serving-color: #125cb3;
--knative-serving-background: #f2f7fd;
--knative-eventing-color: #287867;
--knative-eventing-background: #f1f8f6;
}

/* Deep-navy canvas for elastic overscroll; regular page content stays white. */
Expand Down Expand Up @@ -406,6 +412,132 @@ body:not(:has(#__search:checked)) .md-header .md-search__icon[for='__search'] {
overflow-wrap: anywhere;
}

/* The docs front door reuses the splash page's component palette. */
.md-typeset .knative-docs-home {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 1rem;
margin-block: 1.5rem;
}

.knative-docs-panel {
min-width: 0;
padding: 1rem;
border: 1px solid #e4e7ec;
border-radius: 0.5rem;
background: #f8fafc;
}

.knative-docs-panel--try {
grid-column: 1 / -1;
padding: 0 0 0.5rem;
border: 0;
background: none;
}

.md-typeset .knative-docs-home h2 {
margin: 0 0 0.75rem;
font-size: 1.1rem;
}

.knative-docs-tracks {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 0.75rem;
margin-block: 1rem;
}

.knative-docs-track {
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
padding: 1rem;
border-radius: 0.5rem;
background: var(--component-background);
}

.knative-docs-track--serving {
--component-color: var(--knative-serving-color);
--component-background: var(--knative-serving-background);
}

.knative-docs-track--functions {
--component-color: var(--knative-functions-color);
--component-background: var(--knative-functions-background);
}

.knative-docs-track--eventing {
--component-color: var(--knative-eventing-color);
--component-background: var(--knative-eventing-background);
}

.md-typeset .knative-docs-track h3 {
margin: 0 0 0.5rem;
color: var(--component-color);
font-size: 1rem;
}

.md-typeset .knative-docs-track p {
margin: 0 0 0.75rem;
}

.md-typeset .knative-docs-track__requirement {
margin-top: auto;
color: var(--md-default-fg-color--light);
font-size: 0.7rem;
}

.md-typeset .knative-docs-track__link {
color: var(--component-color);
font-weight: 600;
}

/* A single descriptive link makes the whole track card clickable. */
.knative-docs-track__link::after {
position: absolute;
inset: 0;
border-radius: 0.5rem;
content: "";
}

.knative-docs-track:hover,
.knative-docs-track:focus-within {
outline: 2px solid var(--component-color);
outline-offset: 2px;
}

.md-typeset .knative-docs-panel > :last-child,
.md-typeset .knative-docs-track > :last-child {
margin-bottom: 0;
}

.md-typeset .knative-docs-panel ul {
margin-left: 1em;
}

.md-typeset .knative-docs-reference {
padding: 1rem;
border: 1px solid #e4e7ec;
border-radius: 0.5rem;
}

.md-typeset .knative-docs-reference h2 {
margin: 0 0 0.5rem;
font-size: 1rem;
}

.md-typeset .knative-docs-reference p {
margin: 0;
}

@media screen and (max-width: 47.5em) {
.md-typeset .knative-docs-home,
.knative-docs-tracks {
grid-template-columns: minmax(0, 1fr);
}
}

/* Ink/link colors differ by over 3:1; reserve persistent underlines for utilities. */
.md-typeset blockquote {
color: var(--md-default-fg-color);
Expand Down
113 changes: 50 additions & 63 deletions docs/versioned/.nav.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,41 @@
nav:
###############################################################################
# Concepts
###############################################################################
- Overview: README.md
###############################################################################
# Getting started
###############################################################################
- Tutorials:
- Explore Knative: getting-started/tutorial.md
- Quickstart:
- Tutorial introduction: getting-started/README.md
- Install Knative using quickstart: getting-started/quickstart-install.md
- Knative Functions:
- Getting Started: getting-started/about-knative-functions.md
- Installing Knative Functions: getting-started/install-func.md
- Creating a function: getting-started/create-a-function.md
- Building, running, or deploying a function: getting-started/build-run-deploy-func.md
- Knative Serving:
- Deploying a Knative Service: getting-started/first-service.md
- Autoscaling: getting-started/first-autoscale.md
- Traffic splitting: getting-started/first-traffic-split.md
- Knative Eventing:
- Getting Started: getting-started/getting-started-eventing.md
- Sources, Brokers, and Triggers: getting-started/first-broker.md
- Using a Knative Service as a source: getting-started/first-source.md
- Using Triggers and sinks: getting-started/first-trigger.md
- What's Next?: getting-started/next-steps.md
- Clean Up: getting-started/clean-up.md
- "E2E tutorial: Knative Bookstore":
- Overview: bookstore/page-0/welcome-knative-bookstore-tutorial.md
- Disclaimer: bookstore/disclaimer/README.md
- Environment Setup: bookstore/page-0.5/environment-setup.md
- 1 - Send Comments to Broker: bookstore/page-1/send-review-comment-to-broker.md
- 2 - Create Sentiment Service: bookstore/page-2/sentiment-analysis-service-for-bookstore-reviews.md
- 3 - Create Bad Word Service: bookstore/page-3/create-bad-word-filter-service.md
- 4 - Create Sequence: bookstore/page-4/create-sequence-to-streamline-ML-workflows.md
- 5 - Create DB service: bookstore/page-5/deploy-database-service.md
- 6 - Advanced event filtering: bookstore/page-6/advanced-event-filtering.md
- 7 - Connect Slack via Camel-K: bookstore/page-7/slack-sink-learning-knative-eventing-and-apache-camel-K-integration.md
- 8 - Extra Challenges: bookstore/extra-challenge/README.md
- Get Started:
- README.md
- Set up a learning cluster: getting-started/quickstart-install.md
- Serving:
- Deploy and call a service: getting-started/first-service.md
- Watch it scale to zero: getting-started/first-autoscale.md
- Update and split traffic: getting-started/first-traffic-split.md
- Functions:
- Start here: getting-started/about-knative-functions.md
- Install func: getting-started/install-func.md
- Create and change a function: getting-started/create-a-function.md
- Run and test locally: getting-started/build-run-deploy-func.md
- Deploy to Knative (optional): getting-started/deploy-a-function.md
- Eventing:
- Explore the Broker: getting-started/getting-started-eventing.md
- Send and receive an event: getting-started/first-source.md
- Filter events (optional): getting-started/first-trigger.md
- Continue learning: getting-started/next-steps.md
- Clean up your environment: getting-started/clean-up.md
###############################################################################
# Functions
###############################################################################
- Functions:
- Knative Functions overview: functions/README.md
- Installing Knative Functions: functions/install-func.md
- Creating functions: functions/creating-functions.md
- Building functions: functions/building-functions.md
- Running functions: functions/running-functions.md
- Subscribing functions: functions/subscribing-functions.md
- Deploying functions: functions/deploying-functions.md
- Invoking functions: functions/invoking-functions.md
- Kafka functions: functions/kafka-functions.md
- Language packs: functions/language-packs.md
- How-to guides:
- Installing Knative Functions: functions/install-func.md
- Creating functions: functions/creating-functions.md
- Building functions: functions/building-functions.md
- Running functions: functions/running-functions.md
- Subscribing functions: functions/subscribing-functions.md
- Deploying functions: functions/deploying-functions.md
- Invoking functions: functions/invoking-functions.md
- Kafka functions: functions/kafka-functions.md
- Language packs: functions/language-packs.md
###############################################################################
# Serving
###############################################################################
Expand Down Expand Up @@ -113,11 +96,24 @@ nav:
# Serving reference docs
- Reference:
- Serving API: serving/reference/serving-api.md
- Code samples: samples/serving.md
###############################################################################
# Eventing
###############################################################################
- Eventing:
- Knative Eventing overview: eventing/README.md
- Bookstore tutorial:
- Overview: bookstore/page-0/welcome-knative-bookstore-tutorial.md
- Disclaimer: bookstore/disclaimer/README.md
- Set up your environment: bookstore/page-0.5/environment-setup.md
- 1 - Send review comments: bookstore/page-1/send-review-comment-to-broker.md
- 2 - Analyze sentiment: bookstore/page-2/sentiment-analysis-service-for-bookstore-reviews.md
- 3 - Filter bad words: bookstore/page-3/create-bad-word-filter-service.md
- 4 - Connect a Sequence: bookstore/page-4/create-sequence-to-streamline-ML-workflows.md
- 5 - Deploy the database: bookstore/page-5/deploy-database-service.md
- 6 - Filter events: bookstore/page-6/advanced-event-filtering.md
- 7 - Connect Slack: bookstore/page-7/slack-sink-learning-knative-eventing-and-apache-camel-K-integration.md
- 8 - Extra challenges: bookstore/extra-challenge/README.md
- Concepts:
- Brokers:
- About Brokers: eventing/brokers/README.md
Expand Down Expand Up @@ -217,19 +213,17 @@ nav:
# Eventing reference docs
- Reference:
- Eventing API: eventing/reference/eventing-api.md
- Code samples: samples/eventing.md
###############################################################################
# CLI
###############################################################################
- CLI tools:
- CLI tools: client/README.md
- Installing the Knative CLI: client/install-kn.md
- Customizing kn: client/configure-kn.md
- kn plugins: client/kn-plugins.md
# Install and Manage
###############################################################################
# Administration
###############################################################################
- Administration:
- Install and Manage:
- Overview: admin/admin-overview.md
- CLI tools:
- CLI tools: client/README.md
- Installing the Knative CLI: client/install-kn.md
- Customizing kn: client/configure-kn.md
- kn plugins: client/kn-plugins.md
- Installing Knative:
- Overview: install/README.md
# YAML Installation
Expand Down Expand Up @@ -327,11 +321,4 @@ nav:
- Uninstalling Knative: install/uninstall.md
# Troubleshooting
- Troubleshooting Knative: install/troubleshooting.md
###############################################################################
# Code samples
###############################################################################
- Code samples:
- Code sample overview: samples/README.md
- Serving code samples: samples/serving.md
- Eventing code samples: samples/eventing.md

Loading
Loading