Problem
Solve this question on: ssh cluster4-controlplane
Utilize the official Calico definition file, available at Calico Installation Guide, to deploy the Calico CNI on the cluster.
Make sure to configure the CIDR to 172.17.0.0/16 and set the encapsulation method to VXLAN.
After the CNI installation, verify that pods can successfully communicate.
Solution
I have followed the page Guide.
also validated the same as per solution provided and it was all same
edited the custom resource definition file
custom-resources.yaml
apiVersion: v1
apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
name: default
spec:
# Configures Calico networking.
calicoNetwork:
ipPools:
- name: default-ipv4-ippool
blockSize: 26
cidr: 172.17.0.0/16
encapsulation: VXLAN
natOutgoing: Enabled
nodeSelector: all()
---
# This section configures the Calico API server.
# For more information, see: https://docs.tigera.io/calico/latest/reference/installation/api#operator.tigera.io/v1.APIServer
apiVersion: operator.tigera.io/v1
kind: APIServer
metadata:
name: default
spec: {}
However,no pod is getting created for calico
watch kubectl get pods -n calico-system
Every 2.0s: kubectl get pods -n calico-system cluster4-controlplane: Tue May 6 04:43:54 2025
No resources found in calico-system namespace.
I don’t understand the second half of the problem TBH – I got calico correctly installed, but I don’t have a clue what the whole “pods communicating” business is about. That’s not a thing, really. I’ll ask the responsible engineer WTFork that’s about.
1 Like
Thanks @rob_kodekloud .
Bytw even after following steps my caloco pods are not coming up as mentioned in the question
I am getting the following message:
watch kubectl get pods -n calico-system
Every 2.0s: kubectl get pods -n calico-system cluster4-controlplane: Tue May 6 04:43:54 2025
No resources found in calico-system namespace.
What is the “result” of the lab. Does it say that calico is installed? Does it say that the “pods are communing with the gods” or something similar?
The second half of the task doesn’t work for me – I’m not sure what " After the CNI installation, verify that pods can successfully communicate" means. But I’m getting the install to work fine:
-
Use the instructions on this page
- apply the operator
- apply the CRDs
- Download custom-resources.yaml from that page.
- Edit custom-resources.yaml to change the CIDR and encapsulation method.
- apply the custom-resources.yaml
This causes the calico-system namespace to get created, it gets populated by pods, and most of the pods come up without complaint. And the grader is happy with this part of the task.
Hi @rob_kodekloud Actualy the same inter pod communication question I got in my actual CKA exam though but not sure how to demonstate that so the grader can make it a “PASS”.
Do i need to create
1.One test pod and expose a service to port 80
2.Create 2nd pod and kubectl exec into that pod and call the other pod service using curl?
The lab is a little vague on how to do that, something I’ve discussed with one of our lab engineers. His claim is that if you can contact a K8s service, the install works, so you could do that with an nginx pod that is exposed as a service, and then try to contact it using a pod with curl installed on it. This should work, and the last time I tried the lab it indeed did.
He’s reworded the question a bit to make this more clear.
1 Like
Thanks for the explanation