Skip to content

KCSA · Domain 5: Platform Security · 16% of the exam

Task 5.6: Connectivity

Control plane to node communication, API server to kubelet verification, the Konnectivity service and securing external access.

Study it

  • Service mesh, PKI and connectivity

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the CNCF documentation page that proves it.

Question 1 · choose 1

A provider runs cluster control planes in its own network, and its customers' worker nodes sit behind firewalls that block every inbound connection from the provider. The API server still has to reach the kubelets for logs and exec. The provider considers the Konnectivity service (beta since Kubernetes v1.18). How does it deal with the firewalls?

  1. AThe API server opens SSH tunnels to each node on port 22
  2. Bkube-proxy relays the API server's requests through Service cluster IPs
  3. CNode agents open connections to the Konnectivity server and keep them for this traffic
  4. DKubelets poll the API server for pending exec sessions over their existing watch connections
Show the answer and why
  • AThe API server opens SSH tunnels to each node on port 22

    Incorrect

    SSH tunnels need the API server to connect to the nodes, which the firewalls block, and they are deprecated in favor of Konnectivity.

  • Bkube-proxy relays the API server's requests through Service cluster IPs

    Incorrect

    kube-proxy implements Service routing inside the cluster; it is not a channel from the control plane to the kubelets.

  • CNode agents open connections to the Konnectivity server and keep them for this traffic

    Correct

    Konnectivity consists of a server in the control plane network and agents in the nodes network; the agents initiate and maintain the connections, which then carry control plane to node traffic.

  • DKubelets poll the API server for pending exec sessions over their existing watch connections

    Incorrect

    Logs and exec are requests from the API server to the kubelet; Konnectivity carries them over agent-initiated connections instead.

The Konnectivity service replaces SSH tunnels with a TCP-level proxy. Because its agents on the nodes dial out to the server in the control plane network, the control plane can reach kubelets even when the nodes accept no inbound connections.

Question 2 · choose 1

To route control plane to node traffic through the Konnectivity service (beta since Kubernetes v1.18), which kube-apiserver flag points to the configuration that tells the API server to use it?

  1. A--egress-selector-config-file
  2. B--service-account-issuer
  3. C--advertise-address
  4. D--proxy-client-cert-file
Show the answer and why
  • A--egress-selector-config-file

    Correct

    The Konnectivity setup task creates an egress selector configuration file and sets the API server's --egress-selector-config-file flag to it.

  • B--service-account-issuer

    Incorrect

    That flag sets the issuer identifier of service account tokens; it does not route traffic through Konnectivity.

  • C--advertise-address

    Incorrect

    That sets the address the API server advertises to cluster members.

  • D--proxy-client-cert-file

    Incorrect

    That configures the client certificate for the aggregation layer's proxy.

kube-apiserver sends its outbound traffic to nodes through Konnectivity when an egress selector configuration, referenced by --egress-selector-config-file, says so.

Question 3 · choose 1

An administrator writes the EgressSelectorConfiguration that sends the API server's traffic to the cluster's nodes and Pods through the Konnectivity service (beta since Kubernetes v1.18). Which name should the egressSelections entry use?

  1. Aetcd
  2. Bcluster
  3. Ccontrolplane
  4. Dkonnectivity
Show the answer and why
  • Aetcd

    Incorrect

    etcd is another supported name; it selects the API server's traffic to etcd, not to the cluster.

  • Bcluster

    Correct

    The setup task uses the name cluster to control the egress traffic to the cluster.

  • Ccontrolplane

    Incorrect

    controlplane is another supported name, but not the one the setup task uses for the API server's traffic to the cluster.

  • Dkonnectivity

    Incorrect

    The entry is named for the traffic it selects; konnectivity is not one of the supported names cluster, etcd and controlplane.

An EgressSelectorConfiguration lists egress selections by name. The Konnectivity setup task uses cluster to route the API server's traffic to the cluster through the Konnectivity server; etcd and controlplane are the other supported names.

Practice domain 5 →Practice all domains →