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
| # These have to be extracted from the qcow2 image | |
| # TODO: Provide these via docker image? | |
| KERNEL="vmlinuz-3.10.0-862.14.4.el7.x86_64" | |
| INITRD="initramfs-3.10.0-862.14.4.el7.x86_64.img" | |
| # This is where the magic happens | |
| # | |
| # To change the ignition (node type), you can use 'bootstrap', 'master' or 'worker' | |
| # coreos.config.url=http://192.168.0.168:8080/bootstrap.ign | |
| # |
| apiVersion: v1 | |
| items: | |
| - apiVersion: v1 | |
| kind: ImageStream | |
| metadata: | |
| annotations: | |
| openshift.io/image.dockerRepositoryCheck: 2017-06-28T15:00:23Z | |
| creationTimestamp: null | |
| generation: 2 | |
| labels: |
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "flag" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "os" |
| #!/boot/bzImage | |
| # Linux kernel userspace initialization code, translated to bash | |
| # (Minus floppy disk handling, because seriously, it's 2017.) | |
| # Not 100% accurate, but gives you a good idea of how kernel init works | |
| # GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st> | |
| # Based on Linux 4.10-rc2. | |
| # Note: pretend chroot is a builtin and affects the current process | |
| # Note: kernel actually uses major/minor device numbers instead of device name |
I use these ansible scripts (see also) to bring up kubernetes clusters, on centos and fedora. The scripts are awesome, but they put selinux into permissive mode, because, "tokens and selinux don't work together."
That's unfortunate, because one of the main things I'm doing when I turn up a kubernetes cluster is bug-hunting, and selinux can be a source of bugs.
I commented out the bit that put selinux into permissive mode:
#- name: Set selinux permissive because tokens and selinux don't work together
# selinux: state=permissive policy={{ ansible_selinux.type }}
# when: ansible_selinux is defined and ansible_selinux.status == "enabled"
| /* | |
| Watch out, os.IsExist(err) != !os.IsNotExist(err) | |
| They are error checkers, so use them only when err != nil, and you want to handle | |
| specific errors in a different way! | |
| Their main purpose is to wrap around OS error messages for you, so you don't have to test | |
| for Windows/Unix/Mobile/other OS error messages for "file exists/directory exists" and | |
| "file does not exist/directory does not exist" |
| #!/usr/bin/env ruby | |
| require 'rubydns' | |
| INTERFACES = [ | |
| [:udp, "0.0.0.0", 53], | |
| [:tcp, "0.0.0.0", 53] | |
| ] | |
| Name = Resolv::DNS::Name | |
| IN = Resolv::DNS::Resource::IN |
See also, http://libraryofalexandria.io/cgo/
cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.
So, Here collect materials.