-
Notifications
You must be signed in to change notification settings - Fork 1
Ingress
Gregory Nickonov edited this page Mar 20, 2019
·
4 revisions
R.ingress :frontend do
add_tls :frontend, 'www.example.org'
add_rule 'www.example.org'
endThis adds an Ingress with the host name www.example.org pointing to the Service frontend and secures it with TLS information from Secret frontend.
| Sunstone property | Kubernetes property | Type |
|---|---|---|
| metadata | metadata | Kubernetes Object Metadata |
| spec | spec | IngressSpec |
Adds a rule to the Ingress specification binding host name to the Service, optionally specifying path and port:
R.ingress :frontend do
# Add rule binding 'www.example.org' with the Service 'frontend', pointing at '/' on port 80
add_rule 'www.example.org'
# The same, but bind to the Service 'frontend-new'
add_rule 'www.example.org', 'frontend-new'
# Specify port and path
add_rule 'www.example.org', 'frontend-new', path: '/new', service_port: 8080
# Add more than one backend/path
add_rule 'www.example.org' do
# Also route everything under /api to service 'api', port 80
add_path :api, 80, '/api'
end
endConfigures Ingress to use TLS when accessing specified hosts:
R.ingress :frontend do
add_tls :frontend, 'www.example.org', 'example.org'
end| Sunstone property | Kubernetes property | Type |
|---|---|---|
| backend | backend | IngressBackend |
| rules | rules | Array of IngressRule |
| tls | tls | Array of IngressTLS |
| Sunstone property | Kubernetes property | Type |
|---|---|---|
| service_name | serviceName | String |
| service_port | servicePort | Integer or String |
| Sunstone property | Kubernetes property | Type |
|---|---|---|
| host | host | String |
| http | http | HTTPIngressRuleValue |
| Sunstone property | Kubernetes property | Type |
|---|---|---|
| paths | paths | Array of HTTPIngressPath |
| Sunstone property | Kubernetes property | Type |
|---|---|---|
| backend | backend | IngressBackend |
| path | path | String |
| Sunstone property | Kubernetes property | Type |
|---|---|---|
| hosts | hosts | Array of String |
| secret_name | secretName | String |