in Education by
Can you please tell me the difference between kubectl apply and kubectl create. Why there are 3 different commands (apply, replace and create) doing the same thing? Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
S. No. Kubectl apply Kubectl create 1. It directly updates in the current live source, only the attributes which are given in the file. It first deletes the resources and then creates it from the file provided. 2. The file used in apply can be an incomplete spec The file used in create should be complete 3. Apply works only on some properties of the resources Create works on every property of the resources 4. You can apply a file that changes only an annotation, without specifying any other properties of the resource. If you will use the same file with a replace command, the command would fail, due to the missing information. To learn more about the Kubectl Command list, you can pay a visit to Kubernetes Cheat Sheet.

Related questions

0 votes
    I have an application on GKE that I wish to be available via HTTPS only, so I have gotten a signed ... to the kubernetes cluster? Select the correct answer from above options...
asked Jan 31, 2022 in Education by JackTerrance
0 votes
    I am new at using Ansible. I tried to create directories and download files using Ansible. Should I use shell ... module is available? Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    I am trying to start a local Kubernetes cluster using minikube start and getting the following error. Starting local ... this slow? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    The situation I have a kubernetes pod stuck in "Terminating" state that resists pod deletions NAME READY STATUS ... not exist. Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I've been using K8S ConfigMap and Secret to manage our properties. My design is pretty simple, that keeps ... 't been created Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    In Jenkins, is there a way to restrict the user to view only certain jobs? Only through "Project-based ... allows job restriction? Select the correct answer from above options...
asked Jan 25, 2022 in Education by JackTerrance
0 votes
    How to rename the AWS Lambda function which I had created for testing purpose? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I tried this: pip3 install --user --upgrade awscli pip3 --version I'm getting: pip 9.0.1 from /downloads/ ... not found. Please help. Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I am unable to find the containers under the directory: /var/lib/docker/containers Can you please tell me the ... the host machine? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    Hello I am trying to upload some files to the amazon S3 bucket but I am facing an error that the key is ... 't exist Please help. Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    I want to expose multiple ports to the machine’s interface. How to achieve this using a docker container? Please help. Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    I have created a docker image. I want to push it into my docker repo but I am facing this error: denied: ... to the resource is denied Select the correct answer from above options...
asked Jan 21, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me what are DevOps tools? Select the correct answer from above options...
asked Jan 9, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me what are tools in DevOps for testing? Select the correct answer from above options...
asked Jan 9, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me what are monitoring tools we have in DevOps? Select the correct answer from above options...
asked Jan 9, 2022 in Education by JackTerrance
...