Created
December 3, 2020 15:17
-
-
Save yanniszark/3bd81cc46b05e6c6c9b94c9368f3091d to your computer and use it in GitHub Desktop.
Istio Repro
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: rbac.istio.io/v1alpha1 | |
kind: ServiceRole | |
metadata: | |
name: access-server | |
namespace: test-istio-rbac | |
spec: | |
rules: | |
- services: | |
- 'server.*' | |
--- | |
apiVersion: rbac.istio.io/v1alpha1 | |
kind: ServiceRoleBinding | |
metadata: | |
name: access-server | |
namespace: test-istio-rbac | |
spec: | |
roleRef: | |
kind: ServiceRole | |
name: access-server | |
subjects: | |
- properties: | |
source.principal: cluster.local/ns/test-istio-rbac/sa/default | |
--- | |
# DestinationRule for mTLS | |
apiVersion: "networking.istio.io/v1alpha3" | |
kind: DestinationRule | |
metadata: | |
name: server-mtls | |
namespace: test-istio-rbac | |
spec: | |
host: server.test-istio-rbac.svc.cluster.local | |
trafficPolicy: | |
tls: | |
mode: ISTIO_MUTUAL |
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: Namespace | |
metadata: | |
name: test-istio-rbac | |
labels: | |
istio-injection: enabled | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: client | |
namespace: test-istio-rbac | |
spec: | |
selector: | |
matchLabels: | |
app: client | |
template: | |
metadata: | |
labels: | |
app: client | |
spec: | |
containers: | |
- name: client | |
image: nicolaka/netshoot | |
command: | |
- "/bin/bash" | |
- "-c" | |
- "sleep infinity" | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: server | |
namespace: test-istio-rbac | |
spec: | |
selector: | |
matchLabels: | |
app: server | |
template: | |
metadata: | |
labels: | |
app: server | |
spec: | |
containers: | |
- name: server | |
image: nicolaka/netshoot | |
command: | |
- "/bin/bash" | |
- "-c" | |
- "sleep infinity" | |
ports: | |
- containerPort: 8081 | |
name: tcp-porta | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: server | |
namespace: test-istio-rbac | |
spec: | |
selector: | |
app: server | |
ports: | |
- port: 8081 | |
targetPort: tcp-porta | |
name: tcp-porta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment