1. Home
  2. /
  3. Knative
  4. /
  5. Service with Environment Variables

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.

More Knative Typing Exercises

Simple Knative ServiceKnative Service with Concurrency LimitKnative Service with Resource LimitsKnative Service with Multiple ContainersKnative Service with Custom LabelsKnative Service with AnnotationsKnative Service with Revision NamingKnative Service with ProbesKnative Service with Scale to Zero

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher