-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
152 additions
and
28 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
### Create credential file | ||
The file must be named as `azure.json`, you can create the file by: | ||
``` | ||
You have to create a JSON credential file for Azure Provider: | ||
```bash | ||
cat <<-EOF > /local/path/to/azure.json | ||
{ | ||
"tenantId": "your-azure-tenant-id", | ||
"subscriptionId": "your-azure-subscription-id", | ||
"resourceGroup": "your-azure-resource-group-name", | ||
"useManagedIdentityExtension": true | ||
"aadClientId": "your-azure-client-id", | ||
"aadClientSecret": "your-azure-client-password" | ||
} | ||
EOF | ||
``` | ||
|
||
### Create secret from file | ||
Use the `azure.json` file to create Kubernetes secret: | ||
Use the JSON file to create a secret. | ||
|
||
```shell | ||
kubectl create secret generic azure-credential --namespace demo --from-file /local/path/to/azure.json | ||
``` | ||
|
||
The secret must be in the same namespace as the External-DNS | ||
The secret must be in the same namespace as the External-DNS | ||
|
||
This secret name and secret key will be used in `spec.azure.secretRef.name` and `spec.azure.secretRef.credentialKey` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
### Create Secret from `credentials.json` | ||
### Create Secret from | ||
Create a Kubernetes secret with the credentials in the same namespace of External-DNS operator. | ||
```shell | ||
kubectl create secret generic "google-credential" --namespace demo --from-file /local/path/to/credentials.json | ||
kubectl create secret generic google-credential --namespace demo --from-file /local/path/to/credentials.json | ||
``` | ||
The file containing the GKE credentials must be named as `credentials.json` | ||
The name and key of this secret will be used in `spec.google.secretRef.name` and `spec.google.secretRef.credentialKey` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
apiVersion: external-dns.appscode.com/v1alpha1 | ||
kind: ExternalDNS | ||
metadata: | ||
name: azure-nodes | ||
name: node.example.com | ||
namespace: demo | ||
spec: | ||
providerSecretRef: | ||
name: azure-credential | ||
source: | ||
type: | ||
group: "" | ||
version: v1 | ||
kind: Node | ||
node: | ||
labelFilter: app=demo-node | ||
annotationFilter: lke.linode.com/wgip=0.0.0.0 | ||
labelFilter: app=demo-node #sample label filter format | ||
annotationFilter: lke.linode.com/wgip=0.0.0.0 #sample annotation filter format | ||
fqdnTemplate: node.example.com | ||
registry: txt | ||
txtOwnerID: external-dns | ||
txtPrefix: xyz | ||
provider: azure | ||
domainFilter: | ||
- example.com | ||
provider: azure | ||
azure: | ||
secretRef: | ||
name: azure-credential | ||
credentialKey: azure.json |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
data: | ||
credentials: awsbase64encodedcredentialdata | ||
kind: Secret | ||
metadata: | ||
name: aws-credential | ||
namespace: demo | ||
type: Opaque |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: external-dns.appscode.com/v1alpha1 | ||
kind: ExternalDNS | ||
metadata: | ||
name: aws-edns-node | ||
namespace: demo | ||
spec: | ||
source: | ||
type: | ||
group: "" | ||
version: v1 | ||
kind: Node | ||
node: | ||
#annotationFilter: lke.linode.com/wgip=172.31.2.1 | ||
fqdnTemplate: node.appscode.info | ||
registry: txt | ||
txtOwnerID: external-dns | ||
txtPrefix: xyz | ||
policy: sync | ||
provider: aws | ||
domainFilter: | ||
- appscode.info | ||
aws: | ||
zoneType: public | ||
secretRef: | ||
name: aws-credential | ||
credentialKey: credentials |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
# Deployment | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: demo-dep | ||
namespace: demo | ||
labels: | ||
app: nginx | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.14.2 | ||
ports: | ||
- containerPort: 80 | ||
--- | ||
# Service | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: demo-svc-lb | ||
namespace: demo | ||
annotations: | ||
external-dns.alpha.kubernetes.io/hostname: service.appscode.info #for Service, you have to add this annotation to specify fully qualified domain name | ||
labels: | ||
app: demo-svc | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: nginx | ||
ports: | ||
- port: 80 | ||
targetPort: 80 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
data: | ||
credentials.json: base64encodedgooglecredentials | ||
kind: Secret | ||
metadata: | ||
name: google-cred | ||
namespace: demo | ||
type: Opaque |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: external-dns.appscode.com/v1alpha1 | ||
kind: ExternalDNS | ||
metadata: | ||
name: google-edns-node | ||
namespace: demo | ||
spec: | ||
source: | ||
type: | ||
group: "" | ||
version: v1 | ||
kind: Service | ||
registry: txt | ||
txtOwnerID: external-dns | ||
txtPrefix: service | ||
provider: google | ||
domainFilter: | ||
- appscode.info | ||
google: | ||
project: appscode-testing | ||
secretRef: | ||
name: google-cred | ||
credentialKey: credentials.json |