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: mysql-service | |
spec: | |
ports: | |
- port: 3306 | |
targetPort: 3306 | |
protocol: TCP | |
name: 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: v1 | |
kind: Service | |
metadata: | |
name: test-service | |
spec: | |
type: LoadBalancer | |
ports: | |
- name: test-service | |
port: 80 | |
protocol: TCP |
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
async.parallel([ | |
function(callback) { | |
setTimeout(function() { | |
console.log('Task One'); | |
callback(null, 1); | |
}, 200); | |
}, | |
function(callback) { | |
setTimeout(function() { | |
console.log('Task Two'); |
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
async.series([ | |
function(callback) { | |
console.log('one'); | |
callback(null, 1); | |
}, | |
function(callback) { | |
console.log('two'); | |
callback(null, 2); | |
}, | |
function(callback) { |
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
async.waterfall([ | |
function(callback) { | |
callback(null, 'Task 1', 'Task 2'); | |
}, | |
function(arg1, arg2, callback) { | |
// arg1 now equals 'Task 1' and arg2 now equals 'Task 2' | |
let arg3 = arg1 + ' and ' + arg2; | |
callback(null, arg3); | |
}, | |
function(arg1, callback) { |
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
// create a queue object with concurrency 2 | |
var q = async.queue(function(task, callback) { | |
console.log('Hello ' + task.name); | |
callback(); | |
}, 2); | |
// assign a callback | |
q.drain = function() { | |
console.log('All items have been processed'); | |
}; |
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
// create a queue object with concurrency 1 | |
var q = async.priorityQueue(function(task, callback) { | |
console.log('Hello ' + task.name); | |
callback(); | |
}, 1); | |
// assign a callback | |
q.drain = function() { | |
console.log('All items have been processed'); | |
}; |
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
async.race([ | |
function (callback) { | |
setTimeout(function () { | |
callback(null, 'one'); | |
}, 300); | |
}, | |
function (callback) { | |
setTimeout(function () { | |
callback(null, 'two'); | |
}, 100); |
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
{ | |
"cluster": { | |
"status": "CREATING", | |
"name": "eks-blog-cluster", | |
"certificateAuthority": {}, | |
"roleArn": "arn:aws:iam::XXXXXXXXXXXX:role/eks-service-role", | |
"resourcesVpcConfig": { | |
"subnetIds": [ | |
"subnet-0b8da2094908e1b23", | |
"subnet-01a46af43b2c5e16c" |
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: | |
name: mongodb | |
spec: | |
template: | |
metadata: | |
labels: | |
app: mongodb | |
spec: |