Skip to content

Instantly share code, notes, and snippets.

@danehans
Last active July 16, 2020 19:44
Show Gist options
  • Save danehans/42d1f7c9b25dc24344a658ecb2f3a905 to your computer and use it in GitHub Desktop.
Save danehans/42d1f7c9b25dc24344a658ecb2f3a905 to your computer and use it in GitHub Desktop.
kube-controller-manager-logs-for-svc-lb
$ oc create -f ${MY_TEST_POD_AND_SVC}
$ oc logs ${MY_KCM_POD_NAME} -n openshift-kube-controller-manager
<SNIP>
I0716 19:11:10.508530 1 controller.go:337] Ensuring load balancer for service default/hello-openshift
I0716 19:11:10.508575 1 controller.go:800] Adding finalizer to service default/hello-openshift
I0716 19:11:10.510022 1 event.go:278] Event(v1.ObjectReference{Kind:"Service", Namespace:"default", Name:"hello-openshift", UID:"a37e6c43-43fd-45fb-8988-674e8a5119f3", APIVersion:"v1", ResourceVersion:"45997", FieldPath:""}): type: 'Normal' reason: 'EnsuringLoadBalancer' Ensuring load balancer
I0716 19:11:10.525194 1 aws.go:3605] EnsureLoadBalancer(dhansen-t9xjx, default, hello-openshift, us-west-2, , [{ TCP <nil> 80 {0 8080 } 30371}], map[])
I0716 19:11:10.712821 1 aws.go:3389] Ignoring private subnet for public ELB "subnet-06471a32c07d11ca0"
I0716 19:11:10.712842 1 aws.go:3389] Ignoring private subnet for public ELB "subnet-02624961c1db10707"
I0716 19:11:10.712848 1 aws.go:3389] Ignoring private subnet for public ELB "subnet-09ea57c793f4f0cfa"
I0716 19:11:10.712854 1 aws.go:3389] Ignoring private subnet for public ELB "subnet-0da0d2bd90f53b87e"
I0716 19:11:11.089417 1 aws.go:3053] Existing security group ingress: sg-06ef02a0ca6c39fae []
I0716 19:11:11.089469 1 aws.go:3084] Adding security group ingress: sg-06ef02a0ca6c39fae [{
FromPort: 3,
IpProtocol: "icmp",
IpRanges: [{
CidrIp: "0.0.0.0/0"
}],
ToPort: 4
} {
FromPort: 80,
IpProtocol: "tcp",
IpRanges: [{
CidrIp: "0.0.0.0/0"
}],
ToPort: 80
}]
I0716 19:11:11.212476 1 aws_loadbalancer.go:951] Creating load balancer for default/hello-openshift with name: aa37e6c4343fd45fb8988674e8a5119f
I0716 19:11:12.135279 1 aws_loadbalancer.go:1154] Updating load-balancer attributes for "aa37e6c4343fd45fb8988674e8a5119f"
I0716 19:11:12.574072 1 aws.go:4229] Adding rule for traffic from the load balancer (sg-06ef02a0ca6c39fae) to instances (sg-0758ce8fcdf7f4f49)
I0716 19:11:12.648544 1 aws.go:3128] Existing security group ingress: sg-0758ce8fcdf7f4f49 [{
FromPort: 6081,
IpProtocol: "udp",
ToPort: 6081,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 6443,
IpProtocol: "tcp",
IpRanges: [{
CidrIp: "10.0.0.0/16"
}],
ToPort: 6443
} {
FromPort: 2379,
IpProtocol: "tcp",
ToPort: 2380,
UserIdGroupPairs: [{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 9000,
IpProtocol: "udp",
ToPort: 9999,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 10257,
IpProtocol: "tcp",
ToPort: 10257,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 22623,
IpProtocol: "tcp",
IpRanges: [{
CidrIp: "10.0.0.0/16"
}],
ToPort: 22623
} {
FromPort: 30000,
IpProtocol: "udp",
ToPort: 32767,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 4789,
IpProtocol: "udp",
ToPort: 4789,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: -1,
IpProtocol: "icmp",
IpRanges: [{
CidrIp: "10.0.0.0/16"
}],
ToPort: -1
} {
FromPort: 10259,
IpProtocol: "tcp",
ToPort: 10259,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 30000,
IpProtocol: "tcp",
ToPort: 32767,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
IpProtocol: "-1",
UserIdGroupPairs: [{
GroupId: "sg-01f207e43b48230d8",
UserId: "269733383066"
}]
} {
FromPort: 22,
IpProtocol: "tcp",
IpRanges: [{
CidrIp: "10.0.0.0/16"
}],
ToPort: 22
} {
FromPort: 9000,
IpProtocol: "tcp",
ToPort: 9999,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 10250,
IpProtocol: "tcp",
ToPort: 10250,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 6641,
IpProtocol: "tcp",
ToPort: 6642,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
}]
I0716 19:11:12.648729 1 aws.go:3025] Comparing sg-06ef02a0ca6c39fae to sg-01f207e43b48230d8
I0716 19:11:12.648737 1 aws.go:3156] Adding security group ingress: sg-0758ce8fcdf7f4f49 [{
IpProtocol: "-1",
UserIdGroupPairs: [{
GroupId: "sg-06ef02a0ca6c39fae"
}]
}]
I0716 19:11:12.770031 1 aws.go:4229] Adding rule for traffic from the load balancer (sg-06ef02a0ca6c39fae) to instances (sg-03f3033814203209c)
I0716 19:11:12.859534 1 aws.go:3128] Existing security group ingress: sg-03f3033814203209c [{
FromPort: 30000,
IpProtocol: "tcp",
ToPort: 32767,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 6081,
IpProtocol: "udp",
ToPort: 6081,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 9000,
IpProtocol: "udp",
ToPort: 9999,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
IpProtocol: "-1",
UserIdGroupPairs: [{
GroupId: "sg-01f207e43b48230d8",
UserId: "269733383066"
}]
} {
FromPort: 22,
IpProtocol: "tcp",
IpRanges: [{
CidrIp: "10.0.0.0/16"
}],
ToPort: 22
} {
FromPort: 30000,
IpProtocol: "udp",
ToPort: 32767,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 9000,
IpProtocol: "tcp",
ToPort: 9999,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 10250,
IpProtocol: "tcp",
ToPort: 10250,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: 4789,
IpProtocol: "udp",
ToPort: 4789,
UserIdGroupPairs: [{
GroupId: "sg-03f3033814203209c",
UserId: "269733383066"
},{
GroupId: "sg-0758ce8fcdf7f4f49",
UserId: "269733383066"
}]
} {
FromPort: -1,
IpProtocol: "icmp",
IpRanges: [{
CidrIp: "10.0.0.0/16"
}],
ToPort: -1
}]
I0716 19:11:12.859772 1 aws.go:3025] Comparing sg-06ef02a0ca6c39fae to sg-01f207e43b48230d8
I0716 19:11:12.859783 1 aws.go:3156] Adding security group ingress: sg-03f3033814203209c [{
IpProtocol: "-1",
UserIdGroupPairs: [{
GroupId: "sg-06ef02a0ca6c39fae"
}]
}]
I0716 19:11:13.082151 1 aws_loadbalancer.go:1380] Instances added to load-balancer aa37e6c4343fd45fb8988674e8a5119f
I0716 19:11:13.082181 1 aws.go:3990] Loadbalancer aa37e6c4343fd45fb8988674e8a5119f (default/hello-openshift) has DNS name aa37e6c4343fd45fb8988674e8a5119f-1646349695.us-west-2.elb.amazonaws.com
I0716 19:11:13.082224 1 controller.go:841] Patching status for service default/hello-openshift
I0716 19:11:13.082308 1 event.go:278] Event(v1.ObjectReference{Kind:"Service", Namespace:"default", Name:"hello-openshift", UID:"a37e6c43-43fd-45fb-8988-674e8a5119f3", APIVersion:"v1", ResourceVersion:"45997", FieldPath:""}): type: 'Normal' reason: 'EnsuredLoadBalancer' Ensured load balancer
$ oc delete -f ${MY_TEST_POD_AND_SVC}
$ oc logs ${MY_KCM_POD_NAME} -n openshift-kube-controller-manager
<SNIP>
I0716 19:29:13.893375 1 controller.go:322] Deleting existing load balancer for service default/hello-openshift
I0716 19:29:13.893688 1 event.go:278] Event(v1.ObjectReference{Kind:"Service", Namespace:"default", Name:"hello-openshift", UID:"a37e6c43-43fd-45fb-8988-674e8a5119f3", APIVersion:"v1", ResourceVersion:"57081", FieldPath:""}): type: 'Normal' reason: 'DeletingLoadBalancer' Deleting load balancer
I0716 19:29:14.171758 1 aws.go:4231] Removing rule for traffic from the load balancer (sg-06ef02a0ca6c39fae) to instance (sg-03f3033814203209c)
I0716 19:29:14.245759 1 aws.go:3025] Comparing sg-06ef02a0ca6c39fae to sg-01f207e43b48230d8
I0716 19:29:14.245776 1 aws.go:3025] Comparing sg-06ef02a0ca6c39fae to sg-06ef02a0ca6c39fae
I0716 19:29:14.245781 1 aws.go:3216] Removing security group ingress: sg-03f3033814203209c [{
IpProtocol: "-1",
UserIdGroupPairs: [{
GroupId: "sg-06ef02a0ca6c39fae"
}]
}]
I0716 19:29:14.372379 1 aws.go:4231] Removing rule for traffic from the load balancer (sg-06ef02a0ca6c39fae) to instance (sg-0758ce8fcdf7f4f49)
I0716 19:29:14.478397 1 aws.go:3025] Comparing sg-06ef02a0ca6c39fae to sg-01f207e43b48230d8
I0716 19:29:14.478518 1 aws.go:3025] Comparing sg-06ef02a0ca6c39fae to sg-06ef02a0ca6c39fae
I0716 19:29:14.478534 1 aws.go:3216] Removing security group ingress: sg-0758ce8fcdf7f4f49 [{
IpProtocol: "-1",
UserIdGroupPairs: [{
GroupId: "sg-06ef02a0ca6c39fae"
}]
}]
I0716 19:29:14.958305 1 aws.go:4417] Ignoring DependencyViolation while deleting load-balancer security group (sg-06ef02a0ca6c39fae), assuming because LB is in process of deleting
I0716 19:29:14.958327 1 aws.go:4441] Waiting for load-balancer to delete so we can delete security groups: hello-openshift
I0716 19:29:25.152242 1 aws.go:4417] Ignoring DependencyViolation while deleting load-balancer security group (sg-06ef02a0ca6c39fae), assuming because LB is in process of deleting
I0716 19:29:25.152309 1 aws.go:4441] Waiting for load-balancer to delete so we can delete security groups: hello-openshift
I0716 19:29:35.309629 1 aws.go:4417] Ignoring DependencyViolation while deleting load-balancer security group (sg-06ef02a0ca6c39fae), assuming because LB is in process of deleting
I0716 19:29:35.309655 1 aws.go:4441] Waiting for load-balancer to delete so we can delete security groups: hello-openshift
I0716 19:29:45.487684 1 aws.go:4428] Deleted all security groups for load balancer: hello-openshift
I0716 19:29:45.487726 1 controller.go:815] Removing finalizer from service default/hello-openshift
I0716 19:29:45.500946 1 garbagecollector.go:404] processing item [discovery.k8s.io/v1beta1/EndpointSlice, namespace: default, name: hello-openshift-2z7hr, uid: 9dcf53b2-bd26-470f-bcf8-ab31e1c0657b]
I0716 19:29:45.501303 1 controller.go:841] Patching status for service default/hello-openshift
I0716 19:29:45.501502 1 event.go:278] Event(v1.ObjectReference{Kind:"Service", Namespace:"default", Name:"hello-openshift", UID:"a37e6c43-43fd-45fb-8988-674e8a5119f3", APIVersion:"v1", ResourceVersion:"57081", FieldPath:""}): type: 'Normal' reason: 'DeletedLoadBalancer' Deleted load balancer
I0716 19:29:45.557473 1 garbagecollector.go:517] delete object [discovery.k8s.io/v1beta1/EndpointSlice, namespace: default, name: hello-openshift-2z7hr, uid: 9dcf53b2-bd26-470f-bcf8-ab31e1c0657b] with propagation policy Background
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment