🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Knative Serving Commands Reference

How to Quick Test Knative Setup
$ kn service create devops --image scmgalaxy/nginx-devopsschoolv1 --port 80
$ kubectl get service --namespace=istio-system istio-ingressgateway
$ kubectl get ksvc
$ curl -i -H "Host: devops.default.example.com" http://a55d9bd78a64e4f13be2abea56a5b927-1180054383.us-west-2.elb.amazonaws.com
$ curl -v -i -H "Host: devops.default.example.com" http://knative.acmeco.cloud
# Check the installed Knative Serving version by running the command:
$ kubectl get namespace knative-serving -o 'go-template={{index .metadata.labels "app.kubernetes.io/version"}}'
$ Check the installed Knative Eventing version by running the command:
$ kubectl get namespace knative-eventing -o 'go-template={{index .metadata.labels "app.kubernetes.io/version"}}'
$ kubectl get configmap config-defaults -n knative-serving
$ kubectl get configmap config-defaults -n knative-serving
$ kubectl describe configmap config-defaults -n knative-serving
$ kubectl describe configmap config-defaults -n knative-serving | grep container-concurrency
$ kubectl edit configmap config-defaults -n knative-serving
$ kubectl exec -it cli-d23e09b1-8e0d-4a8f-b952-4936b074c248-1-00002-deploymen6c886 -n=knative-apps-deploy sh
Check if all containers are running, ready and healthy
Knative Serving Components
$ kubectl get pods -n knative-serving
NAME READY STATUS RESTARTS AGE
activator-6b9dc4c9db-cl56b 1/1 Running 0 2m
autoscaler-77f9b75856-f88qw 1/1 Running 0 2m
controller-7dcb56fdb6-dbzrp 1/1 Running 0 2m
domain-mapping-6bb8f95654-c575d 1/1 Running 0 2m
domainmapping-webhook-c77dcfcfb-hg2wv 1/1 Running 0 2m
webhook-78dc6ddddb-6868n 1/1 Running 0 2m
Knative Serving Networking Layer
$ kubectl get pods -n knative-serving
NAME READY STATUS RESTARTS AGE
net-istio-controller-ccc455b58-f98ld 1/1 Running 0 19s
net-istio-webhook-7558dbfc64-5jmt6 1/1 Running 0 19s
$ kubectl get pods -n istio-system
NAME READY STATUS RESTARTS AGE
istio-ingressgateway-c7b9f6477-bgr6q 1/1 Running 0 44s
istiod-79d65bf5f4-5zvtj 1/1 Running 0 29s
$ kubectl get pods -n knative-serving
NAME READY STATUS RESTARTS AGE
net-kourier-controller-5fcbb6d996-fprpd 1/1 Running 0 103s
$ kubectl get pods -n kourier-system
NAME READY STATUS RESTARTS AGE
3scale-kourier-gateway-86b9f6dc44-xpn6h 1/1 Running 0 2m22s
$ kubectl get pods -n contour-external
NAME READY STATUS RESTARTS AGE
contour-7b995cdb68-jg5s8 1/1 Running 0 41s
contour-certgen-v1.24.2-zmr9r 0/1 Completed 0 41s
envoy-xkzck 2/2 Running 0 41s
$ kubectl get pods -n contour-external
NAME READY STATUS RESTARTS AGE
contour-7b995cdb68-jg5s8 1/1 Running 0 41s
contour-certgen-v1.24.2-zmr9r 0/1 Completed 0 41s
envoy-xkzck 2/2 Running 0 41s
$ kubectl get pods -n contour-internal
NAME READY STATUS RESTARTS AGE
contour-57fcf576fd-wb57c 1/1 Running 0 55s
contour-certgen-v1.24.2-gqgrx 0/1 Completed 0 55s
envoy-rht69 2/2 Running 0 55s
Knative: Troubleshooting & Debugging Guide - Istio Ingressgateway: Autoscaler Component
# Multiple Autoscaler Instances**
# Are there multiple replicas of the autoscaler running? If there's only supposed to be one but multiple are running, that could lead to these conflicts.
$ kubectl get pods -n knative-serving -l app=autoscaler
# Lease Object Inspection:
# Check the status and metadata of the lease object.
$ kubectl get lease autoscaler-bucket-00-of-01 -n knative-serving -o yaml
# Review Autoscaler Configuration:
# Look at the ConfigMap config-autoscaler in the knative-serving namespace. Check for any misconfigurations.
$ kubectl describe configmap config-autoscaler -n knative-serving
# Multiple Autoscalers: First, verify that there aren't multiple instances of the autoscaler running unintentionally. This can sometimes occur in misconfigured deployments.
$ kubectl get pods -n knative-serving -l app=autoscaler
# Check Lease Status: View the details of the lease object to check its status.
$ kubectl describe leases.coordination.k8s.io autoscaler-bucket-00-of-01 -n knative-serving
# Restart Autoscaler: Sometimes, simply restarting the problematic component can resolve the issue.
$ kubectl delete pods -n knative-serving -l app=autoscaler
# Review Autoscaler Configuration:
Look at the ConfigMap config-autoscaler in the knative-serving namespace. Check for any misconfigurations.
$ kubectl describe configmap config-autoscaler -n knative-serving
# Check Knative Autoscaler Logs:
The autoscaler component is responsible for scaling. Review its logs for any issues related to metric collection:
$ kubectl logs -n knative-serving -l app=autoscaler
Knative: Troubleshooting & Debugging Guide - Istio Ingressgateway
# Check Istio-Ingressgateway Pod Status:
$ kubectl get pods -n istio-system
### Check Ksvc Pod Status:
### Ensure that the ksvc pods are running and are in a READY state.
$ kubectl get ksvc
### Check Istio-Ingressgateway Logs:
### Check the logs of the istio-ingressgateway pods to see if there are any errors.
$ kubectl logs -n istio-system -l app=istio-ingressgateway
### Examine VirtualService:
### Verify that the VirtualService created for the Knative Service is correctly configured. This should be pointing to the correct service and port.
$ kubectl get virtualservice
$ kubectl describe virtualservice <name>
### Check Knative Serving Controller Logs:
$ Knative Serving Controller logs might have important messages about the service's state.
$ kubectl logs -n knative-serving <controller-pod-name>
Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x