Managing State with Deployments kubectl --record unnown flag
Hi,
I have problem with flag --record ? I don't know whats the point.
kubectl create deploy ghost --image=ghost --record
Error: unknown flag: --record
kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.4",
Comments
-
-1
-
Yes I know but I would like to know why doesn't working
,excercise is in "imperative" way
Best,
GA0 -
Features are often changing in Kubernetes as the software matures and it goes through several releases. You can check the documentation or the command line reference to see whether there is any explanation why the flag no longer works in the given context. If there are no references to it being deprecated or no longer supported (and it is expected to work), then this unexpected behavior could be reported as a bug on the Kubernetes github issues site.
Regards,
-Chris1 -
ok ,thank you
0 -
@GrzegorzArtichowicz said:
Hi,I have problem with flag --record ? I don't know whats the point.
kubectl create deploy ghost --image=ghost --record
Error: unknown flag: --recordkubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.4",I got the same error with the client version v1.21.4: 'Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.4"'
there is no description of the error in 'kubectl create --help', but I found the 2 issues in the repo mentioned:
https://github.com/kubernetes/kubernetes/issues/81289
https://github.com/kubernetes/kubernetes/issues/40422
They show me that --record will be deprecated.
However, it is still in progress and should not affect in v1.21.4, I think this might be a bug?0 -
@GrzegorzArtichowicz said:
Hi,I have problem with flag --record ? I don't know whats the point.
kubectl create deploy ghost --image=ghost --record
Error: unknown flag: --recordkubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.4",I got the same error with the client version v1.21.4: 'Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.4"'
there is no description of the error in 'kubectl create --help', but I found the 2 issues in the repo mentioned:
https://github.com/kubernetes/kubernetes/issues/81289
https://github.com/kubernetes/kubernetes/issues/40422
They show me that --record will be deprecated.
However, it is still in progress and should not affect in v1.21.4, I think this might be a bug?0 -
Hi there,
I've got this issue too. Could you please review Chapter 7 "Deployment Rollbacks"? It seems to be deprecated until 1.6, but the --record flag it still in the documentation. Therefore it's very confusing to me and maybe others.Edit:
Also the CHANGE-CAUSE seems to not recorded anymore.Thanks a lot.
0 -
Hi @mgerstaedt,
Have you tried the
--record=truesyntax instead? It helps to record the change-cause annotation for a rolling update.Regards,
-Chris-1 -
I suggest to change this error in training materials, because --record flag is not available since 2020 at least.
As a workaround you can:- Run
kubectl create deploy ghost --image=ghost - Run
kubectl get deployments.apps ghost -o yaml > ghost.yaml - Run
vim ghost.yamland remove status, time, versions related info - Run
kubectl delete deployments.apps ghost - And now you can use flag record with warning that it's deprecated and will be removed in the future
kubectl create -f ghost.yaml --record
2 - Run
-
I'm using v1.23.1 because that's what will be used in the CKA exam.
I do not get
kubectl create --recordto work.However, if I do like this:
1.kubectl create -f my_deployment.yaml --save-config
2. Then make some change to my_deployment.yaml, like changing replica count.
3.kubectl apply -f my_deployment.yaml --recordIt works but I get the deprecated warning:
Flag --record has been deprecated, --record will be removed in the future
kubectl set imageis working with the --record flag.I follow the discussion on Kubernetes Github where deprecation of --record flag is being discussed.
Manual annotation seems like one way of moving forward:
https://github.com/kubernetes/kubernetes/issues/40422#issuecomment-11180421030 -
@pnts I believe you can do it in one step, just
kubectl apply -f my_deployment.yaml --recordor imperativelykubectl apply -f my_deployment.yaml --recordor even with migration to declarative formkubectl apply -f my_deployment.yaml --record --save-settings. By the way why do you think that CKA exam will use 1.23.1 and not 1.23.8 for example?)0 -
@oleksazhel
Yes, to do it declaratively worked. Like so:kubectl apply -f my_deployment.yaml --record
Thanks!As for kubernetes version, I got it wrong.
I was referring to this page:
https://training.linuxfoundation.org/certification/certified-kubernetes-administrator-cka/But it says:
Software Version: Kubernetes v1.23
So I guess it could be any patch version.
1 -
Please take this as constructive criticism. I think it is unacceptable that for paid training, years later, it is not updated. I work full time and have kids and I don't have time to troubleshoot things that should be updated. I don't pay for courses to learn how to trouble shoot, i do that all day in my job. I need my study time to be very efficient. I get up at 5 am or earlier to have a bit of time to study and i don't want to waste time troubleshooting incorrect steps in the material. Please update the material
5 -
PS i think this is the best one-liner replacement for the command in the material
kubectl create deployment --image=ghost ghost --dry-run=client -o yaml | k create --record=true -f -
I have to admit I learned more about kubectl figuring that out.
1 -
Also ghost doesn't start for me as it obviously looks for a MySQL database on localhost...this is really bad for a paid course. This isn't what I expected.
0 -
Hi all,
I myself went into the same situation where the instructions are still not updated, however that should not trigger any extensive troubleshooting as the idea is to experience how the rollout works on a specific deployments. You may use the image in the previous exercise, something like this one:
kubectl create deploy dev-web --image=nginx:1.13.7-alpine --dry-run=client -o yaml | kubectl create --record=true -f -
kubectl set image deployment/dev-web nginx=nginx:1.13.8-alpine --all
kubectl rollout history deployment/dev-web
kubectl rollout undo deployment/dev-web ; kubectl get pods
kubectl rollout pause deployment/dev-web
kubectl rollout resume deployment/dev-web
Happy k8s learning!
Florin1 -
Com'on man!
it's 2023, we paid so much money and the errors are still here?!
has anybody read those forums in three years?
I don't have time to waste to troubleshoot those so expensive courses!
I arrived here after one hour googleing, I study in the night, having full day work and two children.0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 750 Linux Foundation IT Professional Programs
- 373 Cloud Engineer IT Professional Program
- 169 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 4 DevOps & GitOps IT Professional Program
- 99 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 1 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 5 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 2 Open Source Best Practice Training
- 1 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 769 Linux Distributions
- 81 Debian
- 68 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 955 Programming and Development
- 310 Kernel Development
- 627 Software Development
- 984 Software
- 376 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)
