This file contains hidden or 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
| write_files: | |
| - path: /etc/modprobe.d/bonding.conf | |
| content: | | |
| # Prevent kernel from automatically creating bond0 when the module is loaded. | |
| # This allows systemd-networkd to create and apply options to bond0. | |
| options bonding max_bonds=0 | |
| - path: /etc/systemd/network/10-eth.network | |
| permissions: 0644 | |
| owner: root | |
| content: | |
This file contains hidden or 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
| # etcd clustering: | |
| https://coreos.com/os/docs/latest/cluster-discovery.html | |
| # Getting the etcd version. The etcd version of a specific instance can be obtained from the /version endpoint. | |
| curl -L http://127.0.0.1:4001/version | |
| # Starting etcd manually with add’l flags: | |
| ./etcd --name 10.0.0.5 \ |
This file contains hidden or 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
| $ cat /etc/kubernetes/cni/net.d/10-ipvlan.conf | |
| { | |
| "cniVersion": "0.2.0", | |
| "name": "ipvlan-net", | |
| "type": "ipvlan", | |
| "master": "mgt", | |
| "ipam": { | |
| "type": "host-local", | |
| "subnet": "10.30.118.136/29", | |
| "rangeStart": "10.30.118.141", |
This file contains hidden or 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
| Provisioning to use Calico | |
| 1/20/2017 | |
| First, tearing down the cluster, by doing this on each node: | |
| kubeadm reset | |
| rm -rf .kube | |
| systemctl start kubelet.service | |
| Did yum -y update on all nodes as well. Downloaded http://docs.projectcalico.org/v1.6/getting-started/kubernetes/installation/hosted/kubeadm/calico.yaml and then ran "kubectl create -f calico.yaml". | |
| Starting up cluster (with just the master node). |
This file contains hidden or 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
| /usr/bin/kubelet --pod-manifest-path=/etc/kubernetes/manifests |
This file contains hidden or 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
| # from node running docker (k8s node) | |
| docker ps | grep web | |
| "NetworkSettings": { | |
| "Bridge": "", | |
| "SandboxID": "", | |
| "HairpinMode": false, | |
| "LinkLocalIPv6Address": "", | |
| "LinkLocalIPv6PrefixLen": 0, | |
| "Ports": null, |
This file contains hidden or 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
| ______________________________________________________________ | |
| k8s+contiv BGP peering setup | |
| Status: | |
| - able to peer with ASR1K route-reflector | |
| - able to see reflected routes in k8s netctl bgp output | |
| - NOT able to see k8s pod routes in ASR1K | |
| ------------------------------------------------------- |
This file contains hidden or 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
| // GenerateHardwareAddr generates 48 bit virtual mac addresses based on the IP4 or IPv6 input. | |
| func GenerateHardwareAddr(ip net.IP, prefix []byte) (net.HardwareAddr, error) { | |
| switch { | |
| case (ip.To4() || ip.To16()) == nil: | |
| return nil, SupportIpErr{msg: "GenerateHardwareAddr requires an IPv4 or IPv6 address as input"} | |
| case len(prefix) != len(PrivateMACPrefix): | |
| return nil, InvalidPrefixLengthErr{msg: fmt.Sprintf( | |
| "Prefix has length %d instead of %d", len(prefix), len(PrivateMACPrefix)), |
This file contains hidden or 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: | |
| labels: | |
| name: web | |
| role: service | |
| name: web | |
| spec: | |
| #type: NodePort | |
| ports: |
This file contains hidden or 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
| $ build/run.sh make test | |
| <SNIP> | |
| ok k8s.io/kubernetes/pkg/controller/namespace/deletion 0.070s | |
| E0412 18:15:20.929533 21693 range_allocator.go:234] Node node0 already has allocated CIDR 127.123.234.0/30. Releasing assigned one if different. | |
| E0412 18:15:21.071332 21693 test_utils.go:361] Encoutered error while getting reference: selfLink was empty, can't make reference | |
| E0412 18:15:21.071799 21693 test_utils.go:361] Encoutered error while getting reference: selfLink was empty, can't make reference | |
| E0412 18:15:21.072141 21693 test_utils.go:361] Encoutered error while getting reference: selfLink was empty, can't make reference | |
| E0412 18:15:22.778378 21693 test_utils.go:361] Encoutered error while getting reference: selfLink was empty, can't make reference | |
| E0412 18:15:23.932462 21693 test_utils.go:361] Encoutered error while getting reference: selfLink was empty, can't make reference | |
| E0412 18:15:24.535603 21693 test_utils.go:361] Encoutered error while getting reference: selfLink was empty, can't make |