Skip to content

Instantly share code, notes, and snippets.

@christian-posta
Created August 20, 2018 23:11
Show Gist options
  • Save christian-posta/3bb52646891f30ec628e2b6cecdbbf33 to your computer and use it in GitHub Desktop.
Save christian-posta/3bb52646891f30ec628e2b6cecdbbf33 to your computer and use it in GitHub Desktop.
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: custom-ingressgateway-service-account
labels:
app: custom-ingressgateway
---
apiVersion: v1
kind: Service
metadata:
name: custom-ingressgateway
annotations:
labels:
app: custom-ingressgateway
istio: custom-ingressgateway
spec:
type: LoadBalancer
selector:
app: custom-ingressgateway
istio: custom-ingressgateway
ports:
-
name: http2
nodePort: 31381
port: 80
targetPort: 80
-
name: https
nodePort: 31391
port: 443
-
name: tcp
nodePort: 31401
port: 31400
-
name: tcp-pilot-grpc-tls
port: 15011
targetPort: 15011
-
name: tcp-citadel-grpc-tls
port: 8060
targetPort: 8060
-
name: http2-prometheus
port: 15030
targetPort: 15030
-
name: http2-grafana
port: 15031
targetPort: 15031
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: custom-ingressgateway
labels:
app: custom-ingressgateway
istio: custom-ingressgateway
spec:
replicas: 1
template:
metadata:
labels:
app: custom-ingressgateway
istio: custom-ingressgateway
annotations:
sidecar.istio.io/inject: "false"
scheduler.alpha.kubernetes.io/critical-pod: ""
spec:
serviceAccountName: custom-ingressgateway-service-account
containers:
- name: ingressgateway
image: "gcr.io/istio-release/proxyv2:1.0.0"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
- containerPort: 443
- containerPort: 31400
- containerPort: 15011
- containerPort: 8060
- containerPort: 15030
- containerPort: 15031
args:
- proxy
- router
- -v
- "2"
- --discoveryRefreshDelay
- '1s' #discoveryRefreshDelay
- --drainDuration
- '45s' #drainDuration
- --parentShutdownDuration
- '1m0s' #parentShutdownDuration
- --connectTimeout
- '10s' #connectTimeout
- --serviceCluster
- custom-ingressgateway
- --zipkinAddress
- zipkin.istio-system:9411
- --statsdUdpAddress
- istio-statsd-prom-bridge.istio-system:9125
- --proxyAdminPort
- "15000"
- --controlPlaneAuthPolicy
- NONE
- --discoveryAddress
- istio-pilot.istio-system:8080
resources:
requests:
cpu: 10m
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: INSTANCE_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: ISTIO_META_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
volumeMounts:
- name: custom-istio-certs
mountPath: /etc/certs
readOnly: true
- name: custom-ingressgateway-certs
mountPath: "/etc/istio/ingressgateway-certs"
readOnly: true
- name: custom-ingressgateway-ca-certs
mountPath: "/etc/istio/ingressgateway-ca-certs"
readOnly: true
volumes:
- name: custom-istio-certs
secret:
secretName: istio.custom-ingressgateway-service-account
optional: true
- name: custom-ingressgateway-certs
secret:
secretName: "custom-ingressgateway-certs"
optional: true
- name: custom-ingressgateway-ca-certs
secret:
secretName: "custom-ingressgateway-ca-certs"
optional: true
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: beta.kubernetes.io/arch
operator: In
values:
- amd64
- ppc64le
- s390x
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 2
preference:
matchExpressions:
- key: beta.kubernetes.io/arch
operator: In
values:
- amd64
- weight: 2
preference:
matchExpressions:
- key: beta.kubernetes.io/arch
operator: In
values:
- ppc64le
- weight: 2
preference:
matchExpressions:
- key: beta.kubernetes.io/arch
operator: In
values:
- s390x
@harpratap
Copy link

harpratap commented Oct 26, 2018

When I try to deploy the samples by changing the selector in gateway to custom-ingressgateway , it is no longer able to reach the deployment. Returns 503. From inside the cluster it returns connection refused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment