Service with Environment Variables - Knative Typing CST Test
Loading…
Service with Environment Variables — Knative Code
Set environment variables for a Knative service container.
# knative/demo/env.yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: env-demo
namespace: default
spec:
template:
spec:
containers:
- image: gcr.io/knative-samples/helloworld-go
env:
- name: GREETING
value: "Hello Knative"Knative Language Guide
Knative is a Kubernetes-based platform that extends Kubernetes to build, deploy, and manage modern serverless workloads. It simplifies running containerized applications with automatic scaling, eventing, and routing capabilities.
Primary Use Cases
- ▸Serverless applications on Kubernetes
- ▸Event-driven microservices
- ▸Automatic scaling workloads
- ▸Routing and traffic management for services
- ▸Integrating with cloud-native CI/CD pipelines
Notable Features
- ▸Automatic scaling to zero and scale up based on demand
- ▸Event-driven architecture with CloudEvents support
- ▸Routing and traffic splitting for versions
- ▸Integration with Kubernetes ecosystem
- ▸Extensible via custom components and operators
Origin & Creator
Knative was created by Google in 2018 as an open-source project to standardize serverless on Kubernetes.
Industrial Note
Knative is ideal for teams deploying cloud-native, event-driven, and serverless workloads in Kubernetes or OpenShift clusters.