servicetrait

command module
v0.0.0-...-2bd7b86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

ServiceTrait

You can use ServiceTrait to create a k8s service for workload on a Kubernetes cluster.

Supported workloads:

  • ContainerizedWorkload
  • StatefulSet
  • Deployment

Getting started

  • At first, you should follow addon-oam-kubernetes-local. And install OAM Application Controller and OAM Core workload and trait controller.
  • Get the Servicetrait project to your GOPATH
git clone https://github.com/oam-dev/catalog.git
  • Fetch the servicetrait image
docker pull chienwong/servicetrait:v1.6
  • Deploy the servicetrait controller.
cd catalog/traits/experimental/servicetrait

make deploy IMG=chienwong/servicetrait:v1.6
  • Apply the sample application config
kubectl apply -f config/samples/
  • Verify ServiceTrait you should see a statefulset looking like below
kubectl get statefulset
NAME  READY   AGE
web   1/1     19s

And a service looking like below

kubectl get service
NAME   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
test   NodePort    10.103.191.25   <none>        80:32502/TCP   15s

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha2
Package v1alpha2 contains API Schema definitions for the core v1alpha2 API group +kubebuilder:object:generate=true +groupName=core.oam.dev
Package v1alpha2 contains API Schema definitions for the core v1alpha2 API group +kubebuilder:object:generate=true +groupName=core.oam.dev

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL