Giter Club home page Giter Club logo

9stepsawesome's Issues

Running `kubectl run ...` only creates a Pod

To be fair, I didn't run through the whole installation guide - I have my own custom k3s cluster here... but when I run the command
$ kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080 I only end up with a single Pod. No Deployment or ReplicaSet is created..

https://github.com/burrsutter/9stepsawesome/blame/master/1_installation_started.adoc#L272

$ kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080
pod/hello-minikube created
$ kubectl get all
NAME                 READY   STATUS    RESTARTS   AGE
pod/hello-minikube   1/1     Running   0          7s

NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.43.0.1    <none>        443/TCP   3d6h
$ kubectl expose deployment hello-minikube --type=NodePort
Error from server (NotFound): deployments.apps "hello-minikube" not found$ kubectl expose deployment hello-minikube --type=NodePort
Error from server (NotFound): deployments.apps "hello-minikube" not found

Is this something new in kubernetes, or maybe it's because I'm using k3s? I noticed some verbage in the installation document about the run command being deprecated and that I would get a warning... There was no warning.

Missing 'service' from delete statement

On the Step 2 doc at Services>Clean Up you forgot to add the resource type that is being deleted.

$ kubectl delete service the-service

Otherwise you get the following error:

error: resource(s) were provided, but no name, label selector, or --all flag specified

Missing selector in postgres-deployment.yaml?

I'm getting the following error when I attempt to create the postgres-deployment.yaml

error: error validating "postgres-deployment.yml": error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation off with --validate=false

I can ignore it for now but it seems like something that should be demonstrated to the current spec. Or am I (very likely) missing something?

UPDATE

I actually can't seem to ignore it. Now I feel confident I am doing something wrong.

The Deployment "postgres" is invalid:
* spec.selector: Required value
* spec.template.metadata.labels: Invalid value: map[string]string{"app":"postgres"}: `selector` does not match template `labels`

UPDATE 2

By rolling back the api version it works. But I'm still not sure that is the correct solution?

apiVersion: apps/v1beta1

Setup for Hybrid Cloud Deployment

Hi Burr,

Great Presentation with in-depth details. That was a cool Demo. I am from the OPS team I would like to know more about the Hybrid Cloud Deployment. Does the setup include Opshift deployment on all 3 clouds and used Kubefed for federated setup. Could you please provide more details on that. Would be really helpful

minikube dashboard --url error

Followed the steps as per the 1_installation_started.adoc

All the steps were success till then. However when I gave the below command.
minikube -p 9steps docker-env
๐Ÿ’ฃ Error getting host: Machine does not exist for api.Exists(9steps)

๐Ÿ˜ฟ Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
๐Ÿ‘‰ https://github.com/kubernetes/minikube/issues/new

hello-minikube image k8s.gcr.io/echoserver:1.10 fails on minishift

Following the steps in the installation and getting started doc produces the following errors in the pod's log messages when running kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080.


Generating self-signed cert
--
ย  | mkdir: cannot create directory '/certs': Permission denied
ย  | Generating a 2048 bit RSA private key
ย  | ..................................................+++
ย  | ...............................+++
ย  | unable to write 'random state'
ย  | writing new private key to '/certs/privateKey.key'
ย  | /certs/privateKey.key: No such file or directory
ย  | 140052491175576:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/certs/privateKey.key','w')
ย  | 140052491175576:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
ย  | Starting nginx
ย  | 2018/08/10 19:57:39 [emerg] 8#8: BIO_new_file("/certs/certificate.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/certs/certificate.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
ย  | nginx: [emerg] BIO_new_file("/certs/certificate.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/certs/certificate.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)

The minishift and oc versions.

~ minishift version
minishift v1.22.0+7163416
~ oc version
oc v3.9.0+191fece
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth

Server https://192.168.99.100:8443
kubernetes v1.10.0

Adding information in 3_kubectl_exec.adoc

Burr,
At the end of the file 3_kubectl_exec.adoc, there are these lines

$ docker build -f Dockerfile_Memory -t 9stepsawesome/myboot:v2 .
# and delete an pods based on that image
$ kubectl delete pods -l app=myboot

Since no change was made in the kubernetes myboot deployment, after exec "kubectl delete pods -l app=myboot", kubernetes will create a new pod of 9stepsawesome/myboot:v1, am I right?

For me the example only worked after I edit the image in the deployment with:

kubectl edit deployment myboot

or

$ kubectl set image deployment/myboot myboot=9stepsawesome/myboot:v2

Forbidden errors when using kubectl run or get namespaces with minishift

I've been following the installation doc using minishift and have hit "Forbidden" errors:

โ”Œ[alonzo] ~/ 
โ””> minishift version
minishift v1.31.0+cfc599c

โ”Œ[alonzo] ~/ 
โ””> minishift addons list
- admin-user			 : enabled	P(0)
- anyuid			 : enabled	P(0)
- admissions-webhook		 : disabled	P(0)
- che				 : disabled	P(0)
- htpasswd-identity-provider	 : disabled	P(0)
- redhat-registry-login		 : disabled	P(0)
- registry-route		 : disabled	P(0)
- xpaas				 : disabled	P(0)

โ”Œ[alonzo] ~/ 
โ””> oc login $(minishift ip):8443 -u admin -p admin
Login successful.

You don't have any projects. You can try to create a new project, by running

    oc new-project <projectname>

โ”Œ[alonzo] ~/ 
โ””> kubectl config set-context $(kubectl config current-context) --namespace=default
Context "/192-168-99-100:8443/admin" modified.

โ”Œ[alonzo] ~/ 
โ””> kubectl config current-context
/192-168-99-100:8443/admin

โ”Œ[alonzo] ~/ 
โ””> kubectl get namespaces
Error from server (Forbidden): namespaces is forbidden: User "admin" cannot list namespaces at the cluster scope: no RBAC policy matched

โ”Œ[alonzo] ~/ 
โ””> kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080
kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
Error from server (Forbidden): deployments.apps is forbidden: User "admin" cannot create deployments.apps in the namespace "default": no RBAC policy matched

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.