burrsutter / 9stepsawesome Goto Github PK
View Code? Open in Web Editor NEWThe exercises/samples repo for bit.ly/9stepsawesome presentation
The exercises/samples repo for bit.ly/9stepsawesome presentation
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.
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
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
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
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
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
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.