Skip to content

wzshiming/kube-activator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kube-activator

This is demo of activator only for scale from 0 to 1

Usage

Build image

docker build -t activator:latest .

Create cluster using kind

kind create cluster

Load image to cluster

kind load docker-image activator:latest

Deploy activator

kubectl apply -k ./manifests

Deploy webserver

docker pull docker.io/library/nginx:latest
kind load docker-image docker.io/library/nginx:latest
kubectl create deployment webserver --image=docker.io/library/nginx:latest
kubectl create service clusterip webserver --tcp=8080:80

Test webserver

kubectl exec -it -n kube-system deploy/activator -- wget -O- webserver.default.svc:8080

Mark webserver as activator target

kubectl annotate service webserver scale-from-zero.zsm.io/deployment=webserver

Scale webserver to 0

kubectl scale deployment webserver --replicas=0

Test activator that will scale webserver to 1 and forward to it

kubectl exec -it -n kube-system deploy/activator -- wget -O- webserver.default.svc:8080

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published