Let's look at some basic kubectl output options.
Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).
We can start with:
kubectl get no
On Tue Oct 27, 2015, history.state.gov began buckling under load, intermittently issuing 500 errors. Nginx's error log was sprinkled with the following errors:
2015/10/27 21:48:36 [crit] 2475#0: accept4() failed (24: Too many open files)
2015/10/27 21:48:36 [alert] 2475#0: *7163915 socket() failed (24: Too many open files) while connecting to upstream...
An article at http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/ provided directions that mostly worked. Below are the steps we followed. The steps that diverged from the article's directions are marked with an *.
su to run ulimit on the nginx account, use ps aux | grep nginx to locate nginx's process IDs. Then query each process's file handle limits using cat /proc/pid/limits (where pid is the process id retrieved from ps). (Note: sudo may be necessary on your system for the cat command here, depending on your system.)fs.file-max = 70000 to /etc/sysctl.conf| import React from 'react'; | |
| import _ from 'lodash'; | |
| import Rx from 'rx'; | |
| import superagent from 'superagent'; | |
| let api = { | |
| host: 'http//localhost:3001', | |
| getData(query, cb) { | |
| superagent |
| require('font-awesome/css/font-awesome.css'); | |
| document.body.innerHTML = '<i class="fa fa-fw fa-question"></i>'; |
| function getWatchers(root) { | |
| root = angular.element(root || document.documentElement); | |
| var watcherCount = 0; | |
| function getElemWatchers(element) { | |
| var isolateWatchers = getWatchersFromScope(element.data().$isolateScope); | |
| var scopeWatchers = getWatchersFromScope(element.data().$scope); | |
| var watchers = scopeWatchers.concat(isolateWatchers); | |
| angular.forEach(element.children(), function (childElement) { | |
| watchers = watchers.concat(getElemWatchers(angular.element(childElement))); |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
| #run me with `rspec -fd --color rspec_examples.rb` | |
| require 'rspec' | |
| # The class we want to test | |
| class YoMama | |
| attr_accessor :makeup | |
| def fat?() true ; end | |
| # RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
| # defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
| module Player | |
| describe MovieList, "with optional description" do | |
| it "is pending example, so that you can write ones quickly" | |
| it "is already working example that we want to suspend from failing temporarily" do | |
| pending("working on another feature that temporarily breaks this one") |