Analyze

Analyze objects

Help

planeo analyze help

Analyze service

Uses AI to interpret errors and provide recommendations

Note: If you just deployed the service, it is recommended you wait at least 5 min before running analyze. Also, analyze usually takes around 2 minutes. Please do not ctrl+c or cancel the operation

planeo analyze service --name <service name> --project <project name> --env <environment name> --cluster <cluster name>

Example-1 (happy service)

planeo create service --build-and-deploy --name simple-python --runtime-env python --runtime-version 3.11.3 --kind web --git-repo https://github.com/planeodev/planeo-simple-python.git --repo-type public --git-branch main --port 8080 --cluster devcluster --project analytics --env dev
planeo analyze service --name simple-python --project analytics --env dev --cluster devcluster

output:

analyzing service for: Project=analytics, Environment=dev, Cluster=devcluster, Service=simple-python
no errors found

Example-2 (broken image)

planeo create service --deploy-only --name simple-nginx --namespace simple-nginx --chart-path charts/simple-nginx --git-repo https://github.com/planeodev/planeo-simple-nginx.git --repo-type public --git-branch main --cluster devcluster --project analytics --env dev
planeo analyze service --name simple-nginx --project analytics --env dev --cluster devcluster

output:

analyzing service for: Project=analytics, Environment=dev, Cluster=devcluster, Service=simple-nginx

error: Service has not ready endpoints, pods: [Pod/simple-nginx-simple-nginx-helmchart-6c85c4c887-8vs65], expected 1
kind: Service
analysis: 
    Error: Service has not ready endpoints, pods: [Pod/simple-nginx-simple-nginx-helmchart-6c85c4c887-8vs65], expected 1.
    Solution:
    1. Check the service endpoint configuration in the Kubernetes dashboard.
    2. Verify that the pod is running and ready by running `kubectl get pods`.
    3. Wait for the pod to be ready by running `kubectl wait`.
    4. Check the service status by running `kubectl get svc`.
    5. If the service is still not ready, try running `kubectl expose` again.
    Note: These steps are in a simplified format and may not cover all possible scenarios.

error: Failed to apply default image tag \":latest\": couldn't parse image reference \":latest\": invalid reference format
kind: Pod 
analysis:
    Error: Couldn't parse image reference \":latest\": invalid reference format
    Solution:
    1. Check if the image reference is correctly formatted.
    2. Verify if the image exists in the registry.
    3. Update the image reference to the correct format.

Last updated