I am creating a CI/CD pipeline.
I run helm install --wait --timeout 300 ...
. But that doesn't really wait, just returns when the "release" status is DEPLOYED
.
So then I see a few things in kubectl get pods --namespace default -l 'release=${TAG}' -o yaml
that could be used:
- kind: Pod
status:
conditions:
- lastProbeTime: null
lastTransitionTime: 2018-05-11T00:30:46Z
status: "True"
type: Initialized
- lastProbeTime: null
lastTransitionTime: 2018-05-11T00:30:48Z
status: "True"
type: Ready
So I guess I will look at when Ready
condition becomes "True".
It feels a bit wrong thing to do... Everyone solves this so I assume there is some feature of kubectl
for that, is there?
Is this the right thing to query? (See Kubernetes JSONPath reference)
kubectl get pods --namespace default -l 'release=sc8757070' -o jsonpath='{.items[*].status.conditions[?(@.type=="Ready")].status}'
If a Pod is Running but not Ready it means that the Readiness probe is failing. When the Readiness probe is failing, the Pod isn't attached to the Service, and no traffic is forwarded to that instance.
After helm init , you should be able to run kubectl get pods --namespace kube-system and see Tiller running. Once Tiller is installed, running helm version should show you both the client and server version. (If it shows only the client version, helm cannot yet connect to the server.
When a new version of a chart is released, or when you want to change the configuration of your release, you can use the helm upgrade command. An upgrade takes an existing release and upgrades it according to the information you provide.
After the helm chart installation is complete, you can verify the installation. Note: Add --cleanup to the command to delete the testing pods after the command is run. You can also check the deployed Kubernetes resources by running one of the following commands: oc get all -n {namespace}
You could use kubectl rollout status
$ kubectl rollout status -h
Show the status of the rollout.
By default 'rollout status' will watch the status of the latest rollout until
it's done...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With