-
-
Save kenichi-shibata/b1b567e38ea0e0a43173c0f5098a37c1 to your computer and use it in GitHub Desktop.
SMI traffic split with Linkerd2. Resources used on https://jonathanbeber.github.io/post/smi-traffic-split/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: debug | |
name: debug | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: debug | |
template: | |
metadata: | |
labels: | |
app: debug | |
spec: | |
containers: | |
- image: ubuntu | |
name: ubuntu | |
command: | |
- sleep | |
- "999999999999" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: simple-service | |
namespace: simple-service | |
spec: | |
selector: | |
app: simple-service | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: simple-service | |
version: v1 | |
name: simple-service-v1 | |
namespace: simple-service | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: simple-service | |
version: v1 | |
spec: | |
containers: | |
- image: jonathanbeber/simple-service:v1 | |
imagePullPolicy: IfNotPresent | |
name: simple-service-v1 | |
ports: | |
- containerPort: 8000 | |
name: http | |
protocol: TCP | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: simple-service-v1 | |
namespace: simple-service | |
spec: | |
selector: | |
app: simple-service | |
version: v1 | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: simple-service | |
version: v2 | |
name: simple-service-v2 | |
namespace: simple-service | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: simple-service | |
version: v2 | |
spec: | |
containers: | |
- image: jonathanbeber/simple-service:v2 | |
imagePullPolicy: IfNotPresent | |
name: simple-service-v2 | |
ports: | |
- containerPort: 8000 | |
name: http | |
protocol: TCP | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: simple-service-v2 | |
namespace: simple-service | |
spec: | |
selector: | |
app: simple-service | |
version: v2 | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: split.smi-spec.io/v1alpha1 | |
kind: TrafficSplit | |
metadata: | |
name: simple-service | |
namespace: simple-service | |
spec: | |
service: simple-service | |
backends: | |
- service: simple-service-v1 | |
weight: 1 | |
- service: simple-service-v2 | |
weight: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment